#include <bits/stdc++.h>
using namespace std;
int arr[100001];
int main() {
  int n, c1 = 0, c0 = 0;
  string s1;
  cin >> n >> s1;
  for (int i = 0; i < s1.size(); i++) {
    if (s1[i] == '1')
      c1++;
    else
      c0++;
  }
  if (c1 >= 1) cout << '1';
  for (int i = 0; i < c0; i++) {
    cout << '0';
  }
  cout << endl;
  return 0;
}
