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