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