#include <bits/stdc++.h>
using namespace std;
int n;
char s[100002], st[100002];
int beautiful(char s[]) {
  int lg = strlen(s) - 1;
  char *poz;
  for (int i = 2; i <= 9; i++)
    if (strchr(s, (char)(i + '0'))) return -1;
  poz = strchr(s, (char)(1 + '0'));
  if (strchr(poz + 1, (char)(1 + '0'))) return -1;
  return lg;
}
int main() {
  int i, q, nrz = 0;
  bool ok = 0;
  cin >> n;
  cin.get();
  for (i = 1; i <= n; i++) {
    cin >> s;
    if (strlen(s) == 1 && s[0] == '0') {
      cout << 0 << '\n';
      return 0;
    }
    if (!ok) {
      q = beautiful(s);
      if (q == -1) {
        ok = 1;
        strcpy(st, s);
      } else
        nrz += q;
    } else
      nrz += beautiful(s);
  }
  if (strlen(st) > 0)
    cout << st;
  else
    cout << 1;
  for (i = 1; i <= nrz; i++) cout << 0;
  return 0;
}
