#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, i, c = 0;
  string s;
  cin >> n;
  cin >> s;
  for (i = 0; i < n; i++) {
    if (s[i] == '0') c = c + 1;
  }
  if (s[0] == '0' && n == 1)
    cout << 0;
  else {
    cout << 1;
    for (i = 0; i < c; i++) cout << 0;
  }
  return 0;
}
