#include <bits/stdc++.h>
using namespace std;
string binary(long long x) {
  string num = "";
  long long i = 0;
  while (x != 0) {
    num += x % 2 + '0';
    x /= 2;
  }
  return num;
}
map<string, int> m;
map<string, int>::iterator mitr;
void fast() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int arr[2];
int main() {
  fast();
  int n;
  string s, a = "";
  cin >> n >> s;
  sort(s.begin(), s.end());
  reverse(s.begin(), s.end());
  for (int i = 0; i < s.size(); i++) arr[s[i] - '0']++;
  if (arr[1] == 0 && arr[0] > 0)
    cout << 0;
  else if (arr[1] > 0 && (arr[0] >= 0)) {
    cout << 1;
    for (int i = 0; i < arr[0]; i++) cout << 0;
  }
  cout << endl;
  return 0;
}
