#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, zrs = 0, r, fl = 0, cp = 0, l, cpfl = 0;
  cin >> n;
  string a[n], cpy;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i][0] == '0')
      fl = 1;
    else if (a[i][0] != '1') {
      cpy = a[i];
      cpfl = 1;
    } else {
      l = a[i].size();
      for (j = l - 1; j > 0; j--) {
        if (a[i][j] != '0') {
          cpy = a[i];
          cp = 1;
          cpfl = 1;
        }
      }
      if (cp == 0)
        zrs = zrs + l - 1;
      else
        cp = 0;
    }
  }
  if (fl == 1)
    cout << "0" << endl;
  else {
    if (cpfl == 1) {
      cout << cpy;
      for (i = 0; i < zrs; i++) cout << "0";
      cout << endl;
    } else {
      cout << "1";
      for (i = 0; i < zrs; i++) cout << "0";
      cout << endl;
    }
  }
  return 0;
}
