#include <bits/stdc++.h>
using namespace std;
int n, num;
char str[100010];
char out[100010];
int main() {
  scanf("%d", &n);
  bool flag = 0, ppp = 0;
  int tlen = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%s", str);
    int len = strlen(str), type;
    if (str[0] == '0')
      type = 2;
    else if (str[0] != '1')
      type = 1;
    else {
      bool ff = 0;
      for (int i = 1; i < len; i++)
        if (str[i] != '0') ff = 1;
      if (ff)
        type = 1;
      else
        type = 3;
    }
    if (type == 1) {
      for (int j = 0; j < len; j++) out[j] = str[j];
      tlen = len;
      ppp = 1;
    }
    if (type == 2) {
      flag = 1;
    }
    if (type == 3) {
      num += len - 1;
    }
  }
  if (flag) {
    printf("0\n");
  } else {
    for (int i = 0; i < tlen; i++) printf("%c", out[i]);
    if (!ppp) printf("1");
    for (int i = 1; i <= num; i++) printf("0");
    printf("\n");
  }
  return 0;
}
