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