#include <bits/stdc++.h>
using namespace std;
inline void FREOPEN() {}
const int dx[] = {1, 0, 0, -1, -1, 1, -1, 1};
const int dy[] = {0, 1, -1, 0, -1, 1, 1, -1};
const int root = (int)1;
const int N = (int)1e5 + 123;
const int logN = (int)log2(N) + 1;
const int inf = (int)1e9 + 1e6;
const long long INF = (long long)1e18 + 1e16;
inline int nextInt() {
  int e;
  scanf("%d", &e);
  return e;
}
inline long long nextLong() {
  long long e;
  scanf("%I64d", &e);
  return e;
}
int main() {
  FREOPEN();
  ios_base::sync_with_stdio(0), cin.tie(NULL);
  int shit;
  cin >> shit;
  string s;
  cin >> s;
  int cnt0, cnt1;
  cnt0 = cnt1 = 0;
  for (char c : s) {
    if (c == '1')
      cnt1++;
    else
      cnt0++;
  }
  if (cnt1 == 0) cout << 0, exit(0);
  if (((int)s.size()) == 1 && cnt1 == 1) cout << 1, exit(0);
  cout << 1;
  while (cnt0--) cout << 0;
  return 0;
}
