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