#include <bits/stdc++.h>
int main() {
  int i, j, n;
  char a[1000];
  while (~scanf("%d", &n)) {
    getchar();
    int j = 0, k = 0;
    gets(a);
    for (i = 0; i < n; i++)
      if (a[i] == '0')
        j++;
      else if (a[i] == '1')
        k++;
    if (k != 0) {
      printf("1");
      for (i = 0; i < j; i++) printf("0");
      printf("\n");
    } else
      printf("0\n");
  }
}
