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