#include <bits/stdc++.h>
using namespace std;
int N;
int num, N1 = 0, N0 = 0;
void init() {
  cin >> N;
  for (int i = 0; i < N; i++) {
    scanf("%1d", &num);
    switch (num) {
      case 0:
        N0++;
        break;
      case 1:
        N1++;
        break;
    }
  }
  return;
}
void judge() {
  if (N1) printf("1");
  while (N0 > 0) {
    printf("0");
    N0--;
  }
  printf("\n");
  return;
}
int main() {
  init();
  judge();
  return 0;
}
