#include <bits/stdc++.h>
using namespace std;
char s[100005], ans[100005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int i, n, l, j, k, flag = 0, pos = -1, zero = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    if (s[0] == '0') {
      cout << "0\n";
      return 0;
    }
    cin >> s;
    if (s[0] != '1') {
      for (k = 0; s[k] != '\0'; k++) ans[k] = s[k];
      ans[k] = '\0';
      flag = 1;
      pos = i;
    } else {
      for (j = 1; s[j] != '\0' && flag == 0; j++)
        if (s[j] != '0') {
          for (k = 0; s[k] != '\0'; k++) ans[k] = s[k];
          ans[k] = '\0';
          flag = 1;
          pos = i;
          break;
        }
    }
    if (pos != i) {
      l = strlen(s);
      zero += l - 1;
    }
  }
  if (flag == 1) {
    cout << ans;
    for (j = 0; j < zero; j++) cout << "0";
    cout << "\n";
  } else {
    cout << "1";
    for (j = 0; j < zero; j++) cout << "0";
    cout << "\n";
  }
}
