#include <bits/stdc++.h>
using namespace std;
void hosSam() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  hosSam();
  string s;
  int n;
  cin >> n >> s;
  long long ans = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') ans++;
  }
  if (ans == s.size())
    cout << "0" << endl;
  else {
    cout << "1";
    while (ans--) {
      cout << "0";
    }
    cout << "\n";
  }
}
