#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, cnt = 0, cnt1 = 0;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') {
      cnt++;
    } else if (s[i] == '1') {
      cnt1++;
    }
  }
  if (cnt1 > 0) {
    cout << 1;
  }
  for (int i = 0; i < cnt; i++) {
    cout << 0;
  }
  cout << '\n';
  return 0;
}
