#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::string;
int main() {
  int n = 0;
  cin >> n;
  string ones = "", zeros = "";
  char c = ' ';
  for (int i = 0; i < n; i++) {
    cin >> c;
    if (c == '1') {
      ones += '1';
    } else {
      zeros += '0';
    }
  }
  if (ones.size() <= 0) {
    cout << "0";
  } else {
    cout << "1" << zeros;
  }
  return 0;
}
