#include <bits/stdc++.h>
const int maxn = 1e6 + 100;
const int MOD = 1e9 + 7;
using namespace std;
struct node {
  int fr, to;
};
char A[maxn];
char B[maxn];
int main() {
  int n;
  int j;
  int sum = 0;
  scanf("%d", &n);
  int i;
  bool flag = false;
  int s = -1;
  int d = -1;
  for (i = 0; i < n; i++) {
    int b = 0;
    scanf("%s", A);
    int l = strlen(A);
    for (j = 0; j < l; j++) {
      if (A[j] == '1')
        b++;
      else if (A[j] != '0')
        b = 10;
    }
    if (b == 0) flag = true;
    if (b > 1) {
      strcpy(B, A);
      d = 1;
    } else
      sum += l - 1;
  }
  if (flag) {
    printf("0\n");
  } else {
    if (d == 1)
      printf("%s", B);
    else
      printf("1");
    for (i = 0; i < sum; i++) printf("0");
    puts("");
  }
  return 0;
}
