#include <bits/stdc++.h>
bool panding(char str[]) {
  int c = 0;
  if (str[0] != '1') c++;
  for (int i = 1; i < strlen(str); i++) {
    if (str[i] != '0') c++;
  }
  return c > 0 ? false : true;
}
int main(int argc, char *argv[]) {
  char arr[200000], str[200000];
  memset(str, strlen(str), 0);
  int i, j = 0, n, k = 0, flag = 0, count = 0;
  scanf("%d", &n);
  while (n--) {
    scanf("%s", arr);
    k = strlen(arr);
    if (arr[0] == '0') {
      memset(arr, strlen(arr), 0);
      str[0] = '0';
      flag = 0;
      count++;
      j = 0;
      break;
    }
    if (panding(arr) == false ||
        arr[0] != '0' && strlen(arr) == 1 && arr[0] != '1' ||
        arr[1] != '0' && strlen(arr) > 1) {
      for (i = 0; i < k; i++) str[i] = arr[i];
      flag++;
      k = 0;
    } else if (arr[0] == '1' && arr[1] == '0' ||
               arr[0] == '1' && strlen(arr) == 1) {
      j += strlen(arr) - 1;
      memset(arr, strlen(arr), 0);
    }
  }
  if (flag)
    printf("%s", str);
  else if (count)
    printf("0");
  else
    printf("1");
  for (i = 0; i < j; i++) printf("0");
  printf("\n");
  return 0;
}
