#include <bits/stdc++.h>
using namespace std;
const long long mxn = 1e5 + 7;
bool used[mxn];
int main() {
  string s;
  long long n, cnt = 0, sum = 0;
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (n == 1 && s[i] == '0') {
      cout << 0;
      return 0;
    } else if (n == 1 && s[i] == '1') {
      cout << 1;
      return 0;
    }
    if (s[i] == '1') {
      cnt++;
    } else {
      sum++;
    }
  }
  cout << 1;
  for (int i = 1; i <= sum; i++) {
    cout << 0;
  }
}
