#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  bool ok = true;
  for (int i = 1; i <= n; i++) {
    char x;
    cin >> x;
    if (x == '1') {
      if (ok == true) {
        cout << x;
        ok = false;
      }
    } else if (x == '0')
      s += x;
  }
  cout << s << endl;
}
