#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, a, b;
  string s;
  cin >> n;
  cin >> s;
  if (n == 1) {
    if (s == "0") {
      cout << "0" << endl;
      return 0;
    }
    if (s == "1") {
      cout << "1" << endl;
      return 0;
    }
  }
  m = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') m++;
  }
  cout << "1";
  for (int i = 0; i < m; i++) cout << "0";
  cout << endl;
  return 0;
}
