#include <bits/stdc++.h>
using namespace std;
string correctString(string s, int n) {
  int numOf1 = 0;
  int numOf0 = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '0')
      numOf0 += 1;
    else
      numOf1 += 1;
  }
  if (numOf1 == 0)
    return "0";
  else {
    string s = "1";
    for (int i = 0; i < numOf0; ++i) {
      s += "0";
    }
    return s;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  string result = correctString(s, n);
  cout << result << "\n";
}
