#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0, one = 0, i;
  cin >> n;
  char x;
  for (i = 0; i < n; i++) {
    cin >> x;
    if (x == '0')
      count++;
    else
      one++;
  }
  if (one > 0) cout << "1";
  if (count > 0) {
    for (i = 0; i < count; i++) cout << "0";
  }
  if (count == 0 && one == 0) cout << "0";
}
