#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int z = count(s.begin(), s.end(), '0');
  int x = count(s.begin(), s.end(), '1');
  if (x > 0) {
    cout << 1;
    while (z--) cout << 0;
  } else
    cout << 0;
  return 0;
}
