#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000000 + 9;
const int N = 200050;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  cout << s[0];
  for (int i = 1; i < n; i++) {
    if (s[i] == '0') cout << '0';
  }
  cout << endl;
  return 0;
}
