#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int cnt = 0;
  string head = "1";
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    if (s == "0") {
      cout << 0 << endl;
      return 0;
    }
    while (s[s.size() - 1] == '0') {
      s.pop_back();
      cnt++;
    }
    if (s != "1") {
      head = s;
    }
  }
  cout << head;
  for (int i = 0; i < cnt; i++) cout << 0;
  cout << endl;
  return 0;
}
