#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
using ll = long long int;
using vi = vector<int>;
using graph = vector<vi>;
const int INF = 0x3f3f3f3f;
const ll INFL = 0x3f3f3f3f3f3f3f3f;
const int MAXN = 200005;
int fq[4];
int main() {
  int n, m, k;
  string s;
  cin >> n;
  cin >> s;
  for (auto c : s) {
    int x = c - '0';
    fq[x]++;
  }
  if (n == 1) {
    cout << s << '\n';
  } else if (n == 2) {
    if (fq[1] == 2) {
      cout << 1 << '\n';
    } else {
      cout << s << '\n';
    }
  } else {
    cout << 1;
    while (fq[0]--) {
      cout << 0;
    }
  }
}
