#include <bits/stdc++.h>
using namespace std;
int dcmp(double x, double y) {
  return fabs(x - y) <= (1e-8) ? 0 : x < y ? -1 : 1;
}
int count(string &str) {
  int cnt = 0;
  for (int i = 0; str[i] != '\0'; i++)
    if (str[i] == '0') cnt++;
  return cnt;
}
void solve() {
  int n, y;
  cin >> n;
  string str, x = "#";
  bool yes = 1;
  int ans = 0;
  for (int i = 0; i < (int)(n); ++i) {
    cin >> str;
    if (yes) {
      if (str[0] == '0') {
        yes = 0;
        continue;
      }
      if (str[0] == '1') {
        y = count(str);
        if (y + 1 == ((int)((str).size()))) {
          ans += y;
        } else {
          x = str;
        }
      } else {
        x = str;
      }
    }
  }
  if (!yes) {
    cout << "0";
    return;
  }
  if (x[0] == '#') {
    cout << "1";
    for (int i = 0; i < (int)(ans); ++i) cout << "0";
  } else {
    cout << x;
    for (int i = 0; i < (int)(ans); ++i) cout << "0";
  }
}
int main() {
  int t = 1;
  for (int i = 0; i < (int)(t); ++i) solve();
  return 0;
}
