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