#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  int i;
  int count = 0;
  if (n == 1) {
    if (str[0] == '0')
      cout << 0;
    else
      cout << 1;
  } else {
    for (i = 0; i < n; i++) {
      if (str[i] == '0') {
        count++;
      }
    }
    cout << 1;
    for (i = 0; i < count; i++) {
      cout << 0;
    }
  }
}
