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