#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592654;
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
int dx[] = {0, 0, -1, 1, -1, 1, -1, 1};
int dy[] = {1, -1, 0, 0, 1, 1, -1, -1};
void fast() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL), cout.tie(NULL);
}
int main() {
  fast();
  int x;
  cin >> x;
  string s;
  cin >> s;
  sort((s).begin(), (s).end());
  reverse((s).begin(), (s).end());
  int c = count((s).begin(), (s).end(), '1');
  int t = count((s).begin(), (s).end(), '0');
  if (c) {
    cout << 1;
    for (int(i) = 0; (i) < (long long)(t); (i)++) cout << 0;
  } else
    cout << 0;
  cout << endl;
  return 0;
}
