#include <bits/stdc++.h>
using namespace std;
int a[105];
int main() {
  int n;
  int t = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%1d", &a[i]);
    if (a[i] == 0) t++;
  }
  if (n == 1 && a[0] == 0)
    printf("0\n");
  else {
    printf("1");
    for (int i = 0; i < t; i++) printf("0");
    printf("\n");
  }
  return 0;
}
