#include <bits/stdc++.h>
using namespace std;
int cnt = 0;
bool spe(string s) {
  bool one = false;
  int n = s.length();
  cnt = -999999999;
  if (n == 1 && s[0] == '0') return false;
  cnt = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0')
      cnt++;
    else if (!one && s[i] == '1') {
      one = true;
    } else
      return true;
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  string str[n + 1];
  str[n] = "1";
  int ctr = 0;
  int sp = n;
  for (int i = 0; i < n; i++) {
    cin >> str[i];
    if (spe(str[i])) {
      sp = i;
    } else
      ctr += cnt;
  }
  if (ctr < 0) {
    cout << "0";
  } else {
    cout << str[sp];
    while (ctr > 0) {
      putchar('0');
      ctr--;
    }
  }
  return 0;
}
