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