#include <bits/stdc++.h>
using namespace std;
bool valid(string &cad) {
  bool flag = false;
  for (char c : cad)
    if (c == '1') {
      if (!flag)
        flag = true;
      else
        return false;
    } else if (c != '0')
      return false;
  return true;
}
int get(string &cad) { return int(cad.size()) - 1; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  string cad;
  string lead = "";
  int zeros = 0;
  for (int i = int(0); i < int(n); ++i) {
    cin >> cad;
    if (cad == "0") {
      puts("0");
      exit(0);
    }
    if (!valid(cad))
      lead = cad;
    else
      zeros += get(cad);
  }
  if (lead != "")
    cout << lead;
  else
    cout << 1;
  cout << string(zeros, '0') << endl;
  return 0;
}
