#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, cnt = 0;
  cin >> n;
  string str;
  cin >> str;
  if (n == 1) {
    if (str == "1") {
      cout << "1";
    } else {
      cout << "0";
    }
    exit(0);
  }
  for (i = 0; i < str.length(); i++) {
    if (str[i] == '0') {
      cnt++;
    }
  }
  cout << "1";
  while (cnt--) {
    cout << "0";
  }
}
