#include <bits/stdc++.h>
using namespace std;
bool ok(int n) {}
int main() {
  int i, j, k, n;
  char s[100005];
  char ans[100005];
  int z = 0;
  bool flag = false;
  while (scanf("%d", &n) == 1) {
    strcpy(ans, "-1");
    z = 0;
    for (i = 0; i < n; i++) {
      scanf("%s", s);
      if (strcmp(s, "0") == 0 || s[0] == '0') {
        flag = true;
        continue;
      }
      int len = strlen(s);
      for (j = len - 1; j >= 0 && s[j] == '0'; j--) z++;
      s[j + 1] = '\0';
      len = j + 1;
      if (len == 1 && s[j] > '1') {
        strcpy(ans, s);
      } else if (len > 1)
        strcpy(ans, s);
    }
    if (strcmp(ans, "-1") == 0) strcpy(ans, "1");
    if (flag)
      printf("0\n");
    else {
      printf("%s", ans);
      for (i = 0; i < z; i++) printf("0");
      puts("");
    }
  }
}
