#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, z = 0, p;
  cin >> n;
  string s, ans = "1";
  for (i = 0; i < n; i++) {
    p = 0;
    cin >> s;
    if (s == "0") {
      cout << "0";
      return 0;
    }
    if (s[0] > '1') {
      ans = s;
      p = 1;
    } else {
      for (j = 1; j < s.length(); j++) {
        if (s[j] > '0') {
          ans = s;
          p = 1;
          break;
        }
      }
      if (!p) z += s.length() - 1;
    }
  }
  cout << ans;
  while (z--) cout << 0;
}
