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