#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y, long long m) {
  long long r = 1;
  for (; y; y >>= 1) {
    if (y & 1) r = r * x % m;
    x = x * x % m;
  }
  return r;
}
const long long N = 2e3 + 5, M = 1e18;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  ;
  long long n, x = 0, m = 0, k, i, t = 1, ans = 0, j, y = 0, z = 0, c = 0, w,
               last;
  cin >> n;
  string s;
  cin >> s;
  for (long long i = 0; i < n; i++)
    if (s[i] == '0') x++;
  for (long long i = 0; i < n; i++)
    if (s[i] == '1') y = 1;
  for (long long i = 0; i < y; i++) cout << 1;
  for (long long i = 0; i < x; i++) cout << 0;
}
