#include <bits/stdc++.h>
using namespace std;
long long int n, m, a[1000005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  long long int cnt = 0;
  string str;
  cin >> str;
  if (str == "0") {
    cout << str;
    return 0;
  }
  for (auto w : str)
    if (w == '0') cnt++;
  cout << 1;
  for (long long int i = 1; i <= cnt; i++) cout << 0;
  return 0;
}
