#include <bits/stdc++.h>
using namespace std;
int sum(int n) { return ((n + 1) * n) / 2; }
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int z = 0, o = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0')
      z++;
    else
      o++;
  }
  string t(z, '0');
  cout << (o ? "1" : "") << t;
  return 0;
}
