#include <bits/stdc++.h>
using namespace std;
const int N = 110, M = 1010, INF = 0x3f3f3f3f, mod = 1e9 + 7;
const double eps = 1e-6;
using namespace std;
int d[N];
int h[N], e[N * 2], ne[N * 2], idx;
long long dp[N];
int a[N];
char s[N];
bool st[M][M];
int ans = INF;
void add(int a, int b) { e[idx] = b, ne[idx] = h[a], h[a] = idx++; }
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline int read() {
  int date = 0, w = 1;
  char c = 0;
  while (c < '0' || c > '9') {
    if (c == '-') w = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    date = date * 10 + c - '0';
    c = getchar();
  }
  return date * w;
}
long long qmi(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
bool cmp(int first, int second) { return first > second; }
int main() {
  int n, cnt[2] = {0}, tmp;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%1d", &tmp), cnt[tmp]++;
  if (cnt[1]) {
    putchar('1');
    while (cnt[0]--) putchar('0');
    putchar('\n');
  } else
    puts("0");
  return 0;
}
