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