#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, res = "";
  int n;
  cin >> n;
  cin >> s;
  if (s == "0") {
    cout << s << endl;
    return 0;
  }
  res += '1';
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') res += s[i];
  }
  cout << res << endl;
  return 0;
}
