#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, z = "";
  int n, contribution = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> s;
    bool beauty = true;
    if (s[0] == '0') {
      cout << 0 << endl;
      return 0;
    } else if (s[0] != '1') {
      beauty = false;
    } else {
      for (int j = 1; j < s.size(); ++j) {
        if (s[j] != '0') {
          beauty = false;
          break;
        }
      }
    }
    if (!beauty)
      z = s;
    else
      contribution += s.size() - 1;
  }
  s = string(contribution, '0');
  if (z.size() == 0) z = '1';
  z += s;
  cout << z << endl;
  return 0;
}
