#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  long long int c1 = 0, c0 = 0;
  for (long long int i = 0; i < n; i++)
    if (s[i] == '1')
      c1++;
    else
      c0++;
  s = "";
  if (c1 > 0) s = "1";
  while (c0--) s += '0';
  cout << s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T = 1;
  while (T--) solve();
  return 0;
}
