#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const long long mod = 1e9 + 7;
const int oo = 1e9;
string s;
int n;
int main() {
  cin >> n >> s;
  int z = 0, o = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '0') z++;
  }
  if (s == "0") {
    cout << "0";
    return 0;
  }
  string ans = "1";
  for (int i = 1; i <= z; i++) {
    ans += '0';
  }
  cout << ans;
}
