#include <bits/stdc++.h>
using namespace std;
int p(const string &s) {
  if (s[0] != '1') return -1;
  for (int i = 1; i < s.length(); i++)
    if (s[i] != '0') return -1;
  return s.length() - 1;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  int n, v = 0;
  cin >> n;
  string l, m = "1";
  getline(cin, l), getline(cin, l);
  istringstream iss(l);
  for (int i = 0; i < n; i++) {
    string c;
    iss >> c;
    if (c == "0") {
      cout << "0\n";
      return 0;
    }
    int k = p(c);
    if (k == -1)
      m = c;
    else
      v += k;
  }
  ostringstream oss;
  oss << m;
  for (int i = 0; i < v; i++) oss << '0';
  oss << '\n';
  cout << oss.str();
}
