#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx")
using namespace std;
const int N = (int)5e5 + 7, MOD = (int)1e9 + 7;
int n, cnt;
bool ok = 0;
string second;
int main() {
  ios_base ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  cin >> second;
  for (int i = 0; i < n; i++) {
    if (second[i] == '0') {
      cnt++;
    }
    if (second[i] == '1') {
      ok = 1;
    }
  }
  if (ok == 1) {
    cout << 1;
    for (int i = 1; i <= cnt; i++) {
      cout << 0;
    }
    exit(0);
  }
  cout << second << "\n";
  exit(0);
}
