#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  string s;
  getline(cin, s);
  getline(cin, s);
  string bad = "";
  int pw = 0;
  int sz = s.size();
  for (int i = 0; i < sz; ++i) {
    if (s[i] == ' ') continue;
    if (s[i] == '0') {
      cout << '0';
      return 0;
    }
    int r = i;
    bool ok = (s[i] == '1');
    while (r < sz - 1 && s[r + 1] != ' ') {
      ++r;
      if (s[r] != '0') ok = false;
    }
    if (ok)
      pw += r - i;
    else
      bad = s.substr(i, r - i + 1);
    i = r;
  }
  if (bad.empty()) bad = "1";
  cout << bad;
  for (int i = 0; i < pw; ++i) cout << '0';
  return 0;
}
