#include <bits/stdc++.h>
using namespace std;
void tefa() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void end() {}
int main() {
  tefa();
  int n, z = 0, o = 0;
  string s;
  cin >> n >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '1')
      o++;
    else
      z++;
  }
  if (o) {
    cout << "1";
    while (z--) {
      cout << "0";
    }
  } else
    cout << "0";
  end();
}
