#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  string str;
  cin >> str;
  int one = 0;
  int zero = 0;
  for (int i = 0; i < n; i++) {
    if (str[i] == '0')
      zero++;
    else
      one++;
  }
  if (one == 0) {
    cout << "0" << endl;
    return 0;
  }
  if (one > 0) {
    cout << "1";
  }
  while (zero--) {
    cout << "0";
  }
}
