#include <bits/stdc++.h>
using namespace std;
int check_beautiful(string s) {
  int n = s.size();
  int x = 0, idx;
  for (int i = 0; i < n; i++) {
    if (s[i] != '0') {
      if (s[i] != '1')
        return -2;
      else {
        x++;
        idx = i;
      }
    }
  }
  if (x == 0) return -1;
  if (x == 1)
    return n - idx - 1;
  else
    return -2;
}
int main() {
  int n;
  cin >> n;
  string s = "", v;
  int z = 0, x;
  for (int i = 0; i < n; i++) {
    cin >> v;
    x = check_beautiful(v);
    if (x == -1) {
      cout << 0 << endl;
      return 0;
    } else if (x == -2) {
      s += v;
    } else
      z += x;
  }
  if (s == "") s += "1";
  cout << s;
  for (int i = 0; i < z; i++) cout << 0;
  cout << endl;
  return 0;
}
