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