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