#include <bits/stdc++.h>
using namespace std;
int res, n;
string s;
void readInput() { cin >> n >> s; }
void solve() {
  if (s == "0") {
    cout << s;
    return;
  }
  for (int i = 0; i < n; i++) res += (s[i] == '0');
  cout << 1;
  cout << string(res, '0');
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  readInput(), solve();
  return 0;
}
