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