#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  string res, aux, dist;
  long long l, cnt, n, i;
  cin >> n;
  while (n--) {
    cin >> aux;
    if (aux == "0") {
      cout << 0 << endl;
      return 0;
    }
    l = aux.length();
    cnt = 0;
    for (i = l - 1; i >= 0; i--) {
      if (aux[i] != '0') {
        cnt++;
        if (aux[i] != '1') {
          break;
        }
      }
    }
    if (cnt > 1 || i >= 0) {
      dist = aux;
    } else {
      for (i = l - 1; i >= 0; i--) {
        if (aux[i] == '0') {
          res += aux[i];
        }
      }
    }
  }
  if (dist != "") {
    cout << dist + res << endl;
  } else {
    cout << "1" + res << endl;
  }
}
