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