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