#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a[100000], n, k = 0, s1 = 0;
  string s, s2 = "1";
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s;
    s1 = s.size();
    if (s[0] == '0') {
      cout << "0";
      return 0;
    } else if (s[0] != '1')
      s2 = s;
    else {
      for (int j = 1; j < s1; j++)
        if (s[j] != '0') {
          s2 = s;
          break;
        } else if (j == s1 - 1)
          k = k + j;
    }
  }
  cout << s2;
  for (int i = 0; i < k; i++) cout << "0";
  return 0;
}
