#include <bits/stdc++.h>
using namespace std;
string s;
int n;
int main() {
  int c0 = 0, c1 = 0;
  cin >> n >> s;
  if (n == 1 && s[0] == '0')
    cout << s;
  else {
    for (int i = 0; i < n; i++) {
      if (s[i] == '0')
        c0++;
      else
        c1++;
    }
    cout << "1";
    for (int i = 0; i < c0; i++) cout << "0";
    cout << endl;
  }
}
