#include <bits/stdc++.h>
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
using namespace std;
void file() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int isValid(string s) {
  if (s == "0") return 2;
  if (s[0] != '1') return 0;
  for (int i = 1; i < int(s.size()); i++)
    if (s[i] != '0') return 0;
  return 1;
}
int main() {
  file();
  long long n, z = 0;
  cin >> n;
  string dif = "", s;
  while (n--) {
    string s;
    cin >> s;
    int sol = isValid(s);
    if (sol == 2)
      return cout << 0, 0;
    else if (sol == 0)
      dif = s;
    z += int(s.size()) - 1;
  }
  string k(z, '0');
  k = "1" + k;
  for (int i = 0; i < int(k.size()) && i < int(dif.size()); i++) k[i] = dif[i];
  cout << k << '\n';
}
