#include <bits/stdc++.h>
using namespace std;
char num[105];
int main() {
  int n;
  int ans = 0, ans1 = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> num[i];
    if (num[i] == '0') {
      ans++;
    } else {
      ans1++;
    }
  }
  if (ans1) {
    cout << "1";
    for (int i = 0; i < ans; i++) {
      cout << "0";
    }
    cout << endl;
  } else {
    cout << "0" << endl;
  }
  return 0;
}
