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