#include <bits/stdc++.h>
using namespace std;
int n, m, t, k;
const int N = 1e5 + 5;
const double PI = acos(-1);
long long ans = 0;
string s;
int a[N];
bool pr(string x) {
  int n = (int)x.size() - 1;
  while (x[n] == '0') n--;
  if (n == 0 && x[n] == '1')
    return true;
  else
    return false;
}
int F(string x) {
  int t = 0;
  int n = (int)x.size() - 1;
  while (x[n] == '0') {
    t++;
    n--;
  }
  return t;
}
int main() {
  cin >> n;
  int col = 0;
  string ans = "1";
  for (int i = 0; i < n; i++) {
    string x;
    cin >> x;
    if (x == "0") {
      cout << 0;
      return 0;
    }
    if (pr(x))
      col += F(x);
    else
      ans = x;
  }
  cout << ans;
  for (int i = 0; i < col; i++) cout << '0';
}
