#include <bits/stdc++.h>
using namespace std;
int main() {
  int num;
  string s;
  std::cin >> num;
  int len = 0;
  if (num == 1) {
    std::cin >> s;
    std::cout << s;
  } else {
    for (int i = 0; i < num; i++) {
      char s;
      cin >> s;
      if (s == '0') len++;
    }
    std::cout << 1;
    for (int i = 0; i < len; i++) std::cout << 0;
    std::cout << "\n";
  }
  return 0;
}
