#include <bits/stdc++.h>
using namespace std;
void seif() { std::ios_base::sync_with_stdio(0); }
int main() {
  seif();
  bool fz = false;
  long long n, lp = 0;
  cin >> n;
  string si, so = "-1";
  for (int i = 0; i < n; i++) {
    fz = false;
    cin >> si;
    if (si == "0")
      return cout << 0, 0;
    else {
      int bouns = 0;
      for (int j = 0; j < si.length(); j++) {
        if (si[j] == '0')
          bouns++;
        else if (si[j] == '1' && fz == false) {
          fz = true;
        } else {
          so = si;
          bouns = 0;
          break;
        }
      }
      lp += bouns;
    }
  }
  if (so == "-1")
    cout << 1;
  else
    cout << so;
  for (int i = 0; i < lp; i++) cout << 0;
  return 0;
}
