#include <bits/stdc++.h>
using namespace std;
char st[100010];
char ans[100010];
char sto[100010];
int main() {
  int ctr = 0;
  int rctr = 0;
  int n;
  scanf("%d", &n);
  bool checker = true;
  for (int i = 0; i < n; i++) {
    scanf("%s", st);
    if (i == 0) {
      strcpy(sto, st);
    }
    int l = strlen(st);
    if (strcmp(st, "0") == 0) {
      cout << 0 << "\n";
      return 0;
    }
    bool flg = false;
    int oc = 0;
    for (int j = 0; j < l; j++) {
      if (st[j] != '0' && st[j] != '1') {
        flg = true;
      }
      if (st[j] == '1') {
        oc += 1;
      }
    }
    if (flg == true || oc > 1) checker = false;
    if (flg == true || oc > 1 || i == 0) strcpy(ans, st);
    if (flg == false && oc <= 1) {
      for (int j = 0; j < l; j++) {
        if (st[j] == '0') {
          ctr++;
        }
      }
    }
  }
  if (checker == true) {
    int stll = strlen(sto);
    int i = stll - 1;
    while (sto[i] != '1') {
      if (sto[i] == '0') {
        rctr++;
      }
      i--;
    }
  }
  printf("%s", ans);
  for (int i = 0; i < ctr - rctr; i++) printf("0");
  return 0;
}
