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