#include <bits/stdc++.h>
using namespace std;
long long freq[100005];
int32_t main() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  sort(s.begin(), s.end());
  reverse(s.begin(), s.end());
  cout << s[0];
  for (long long i = 1; i < n; i++) {
    if (s[i] == '0') cout << s[i];
  }
  return 0;
}
