#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
long long int n, l, r, k;
string s, d;
int main() {
  cin >> n;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    cin >> s;
    if (s == "0") {
      cout << "0";
      exit(0);
    }
    int cnt1 = 0;
    int len = s.size();
    for (int i = 1; i < len; i++) {
      if (s[i] == '0') cnt1++;
    }
    if (s[0] != '1' || cnt1 + 1 != len) {
      d = s;
      continue;
    }
    cnt += cnt1;
  }
  cout << d;
  if (d == "") cout << "1";
  for (int i = 0; i < cnt; i++) printf("0");
}
