#include <bits/stdc++.h>
using namespace std;
bool is_beauty(const string& s) {
  int ones = 0;
  for (__typeof((s).begin()) it = (s).begin(); it != (s).end(); ++it) {
    if (*it != '1' && *it != '0') return false;
    if (*it == '1') ++ones;
  }
  return ones <= 1;
}
int main() {
  ios::sync_with_stdio(false);
  ;
  int n;
  bool find_zero = false;
  int tot_pot = 0;
  string not_beauty = "1";
  cin >> n;
  while (n--) {
    string num;
    cin >> num;
    if (num == "0") {
      find_zero = true;
    } else {
      if (is_beauty(num)) {
        tot_pot += num.size() - 1;
      } else
        not_beauty = num;
    }
  }
  if (find_zero) {
    cout << "0\n";
    exit(0);
  }
  cout << not_beauty;
  while (tot_pot--) {
    cout << "0";
  }
  cout << "\n";
  return 0;
}
