#include <bits/stdc++.h>
using namespace std;
int n, cnt;
string s;
void Input() {
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; ++i)
    if (s[i] == '0') ++cnt;
  if (cnt == n)
    cout << 0;
  else {
    cout << 1;
    for (int i = 1; i <= cnt; ++i) cout << 0;
  }
}
void Solve() {}
int main() {
  iostream::sync_with_stdio(false);
  cin.tie(0);
  Input();
  Solve();
  return 0;
}
