#include <bits/stdc++.h>
using namespace std;
int fun(string s) {
  int c = 0;
  if (s[0] != '1') {
    if (s[0] == '0')
      return -2;
    else
      return -1;
  }
  for (int i = 1; i < s.length(); i++) {
    if (s[i] != '0') return -1;
    c++;
  }
  return c;
}
int main() {
  int n;
  cin >> n;
  string s, S = "1";
  long long int c = 0;
  bool B = 0;
  for (int i = 0; i < n; i++) {
    cin >> s;
    if (B == 1) continue;
    int k = fun(s);
    if (k == -1) {
      S = s;
      continue;
    }
    if (k == -2) {
      cout << 0 << endl;
      B = 1;
    }
    c += k;
  }
  if (B == 0) {
    cout << S;
    for (int i = 0; i < c; i++) cout << '0';
  }
}
