#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[102], f[102];
  int n, i, j, k = 0, l, c1 = 0, c = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (i = 0; i < n; i++) {
    if (s[i] == '0')
      c++;
    else if (s[i] == '1')
      c1++;
  }
  if (c1 == 0) {
    f[0] = '0';
    f[1] = '\0';
  } else {
    f[k++] = '1';
    for (i = 0; i < c; i++) {
      f[k++] = '0';
    }
    f[k++] = '\0';
  }
  cout << f;
  return 0;
}
