#include <bits/stdc++.h>
using namespace std;
string s[100010];
int cnt[100010];
int main() {
  int n;
  scanf("%d", &n);
  int ii = -1, idx, c;
  bool zero = false;
  for (int j = 0; j < n; j++) {
    cin >> s[j];
    c = 0, idx = -1;
    for (int i = 0; i < s[j].size(); i++) {
      if (s[j][i] == '1') {
        c++;
        idx = i;
      } else if (s[j][i] == '0') {
      } else {
        ii = j;
        break;
      }
    }
    if (c > 1) {
      ii = j;
    }
    if ((ii != j) && (idx == -1)) zero = true;
    cnt[j] = idx;
  }
  if (zero) {
    cout << 0 << endl;
    return 0;
  }
  int i;
  if (ii == -1) ii = 0;
  for (i = 0; i < n; i++) {
    if (i != ii) {
      string ss;
      for (int j = 0; j < (s[i].size() - cnt[i] - 1); j++) {
        ss += "0";
      }
      s[ii] += ss;
    }
  }
  string ans;
  int kk = -1;
  for (int i = 0; i < s[ii].size(); i++) {
    if (s[ii][i] != '0') {
      break;
    }
    kk = i;
  }
  for (int i = kk + 1; i < s[ii].size(); i++) {
    ans += s[ii][i];
  }
  if (ans.size() == 0)
    cout << 0 << endl;
  else
    cout << ans << endl;
  return 0;
}
