#include <bits/stdc++.h>
int main() {
  long long n, temp, gg = 0, i = 0, i_temp = 0, temp1, gg1 = 0, k = 0, l = 0;
  scanf("%lld", &n);
  char a[100001], a_save[100001];
  for (temp = 0; temp < n; temp++) {
    scanf("%s", a);
    if (a[0] == '1') {
      i_temp = 0;
      gg1 = 0;
      for (temp1 = 1; temp1 < strlen(a); temp1++) {
        if (a[temp1] == '0') {
          i_temp++;
        } else {
          i_temp = 0;
          gg1++;
          break;
        }
      }
      if (gg1 != 0) {
        strcpy(a_save, a);
        l++;
      }
      i = i + i_temp;
    } else if (a[0] == '0') {
      gg++;
      break;
    } else {
      strcpy(a_save, a);
      l++;
    }
  }
  if (gg == 0) {
    if (l == 0) {
      printf("1");
    }
    printf("%s", a_save);
    for (temp = 0; temp < i; temp++) {
      printf("0");
    }
  } else {
    printf("0");
  }
}
