#include <bits/stdc++.h>
using namespace std;
long long n, i, le, j, temp, pDif, cant;
vector<string> t;
string cad;
bool isCero, isDif;
bool IsDist() {
  le = t[i].length();
  temp = 0;
  for (j = 0; j < le; j++) {
    if (t[i][j] != '0' && t[i][j] != '1') return true;
    if (t[i][j] == '1') temp++;
    if (temp > 1) return true;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> cad;
    t.push_back(cad);
  }
  isCero = isDif = false;
  cant = 0;
  for (i = 0; i < n; i++) {
    if (t[i] == "0") {
      isCero = 1;
      break;
    }
    if (IsDist()) {
      pDif = i;
      isDif = 1;
    } else {
      cant += t[i].length() - 1;
    }
  }
  if (isCero) {
    cout << "0" << endl;
  } else {
    if (isDif) {
      cout << t[pDif];
    } else {
      cout << "1";
    }
    for (i = 0; i < cant; i++) {
      cout << "0";
    }
    cout << endl;
  }
  return 0;
}
