#include <bits/stdc++.h>
using namespace std;
long long i, j, n, t;
int main() {
  cin >> n;
  string a;
  cin >> a;
  long long z = 0;
  long long o = 0;
  for (long long(i) = (0); (i) < (n); ++(i)) {
    if (a[i] == '0')
      z++;
    else
      o = 1;
  }
  if (o) {
    cout << 1;
  }
  for (long long(i) = (0); (i) < (z); ++(i)) cout << 0;
  return 0;
}
