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