#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, s = 0, s2 = 0;
  cin >> n;
  char a[n];
  cin >> a;
  for (i = 0; i < n; i++) {
    if (a[i] == '0')
      s++;
    else
      s2++;
  }
  if (s2 > 0) cout << "1";
  while (s--) cout << "0";
  return 0;
}
