#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long zero = 0;
  string befnum = "1";
  while (n--) {
    string a;
    cin >> a;
    if (a == "0") {
      cout << 0 << endl;
      return 0;
    }
    if (a[a.length() - 1] != '0' && a != "1") {
      befnum = a;
    }
    if (a[a.length() - 1] == '0') {
      int k = a.length() - 1;
      int tmp = 0;
      while (a[k--] == '0') {
        tmp++;
      }
      if (k == -1 && a[0] == '1') {
        zero += tmp;
      } else {
        befnum = a;
      }
    }
  }
  cout << befnum;
  while (zero--) {
    cout << 0;
  }
  cout << endl;
  return 0;
}
