#include <bits/stdc++.h>
long long arr[1000000];
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(NULL);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  string x;
  bool l = 0;
  cin >> x;
  int c = 0;
  for (int i = 0; i < x.size(); i++) {
    if (x[i] == '1') {
      l = 1;
      x.erase(i, 1);
      i = -1;
    }
  }
  if (l) {
    cout << '1';
    cout << x << endl;
  } else
    cout << x << endl;
}
