#include <bits/stdc++.h>
using namespace std;
double EPS = 1e-8;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<string> v(n);
  string result = "1";
  int zerocount = 0;
  for (int i = 0; i < n; i++) {
    bool beautiful = 1;
    cin >> v[i];
    if (v[i] == "0") {
      cout << 0;
      return 0;
    }
    int temp = 0;
    if (v[i][0] == '1')
      for (size_t j = 1; j < v[i].size(); j++) {
        if (v[i][j] != '0') beautiful = 0;
        temp++;
      }
    else
      beautiful = 0;
    if (beautiful)
      zerocount += temp;
    else
      result = v[i];
  }
  for (int i = 0; i < zerocount; i++) {
    result += '0';
  }
  cout << result;
}
