#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  string ans;
  ans += s[0];
  for (int i = 1; i < n; ++i) {
    if (s[i] == '0') ans += '0';
  }
  cout << ans << '\n';
  return 0;
}
