#include <bits/stdc++.h>
using namespace std;
int n;
string s;
vector<string> w;
vector<long long int> nums;
bool b(string t) {
  if (t == "1") return true;
  for (int i = 1; i < t.size(); i++) {
    if (t[i] != '0') return false;
  }
  if (t[0] == '1') return true;
  return false;
}
int main() {
  cin >> n;
  bool ky = false;
  long long int x = 0;
  for (int i = 0; i < n; i++) {
    cin >> s;
    w.push_back(s);
    if (s == "0") ky = true;
  }
  if (ky == true) {
    cout << 0;
    return 0;
  }
  if (w.size() == 1) {
    cout << w[0];
    return 0;
  }
  int zcount = 0, fc = 0;
  long long rs = 1;
  string st;
  for (int i = 0; i < w.size(); i++) {
    string k = w[i];
    if (b(k) == false) {
      st = k;
      fc++;
    } else
      zcount += k.size() - 1;
  }
  cout << st;
  if (fc == 0) cout << 1;
  for (int i = 0; i < zcount; i++) cout << 0;
  return 0;
}
