#include <bits/stdc++.h>
using namespace std;
int n, num_zeros, is_beautiful;
char input_str[100010];
string num, not_beautiful = "1";
int main(int argc, char const *argv[]) {
  cin >> n;
  int found_not_beautiful = 0;
  while (n--) {
    cin >> num;
    if (num.length() == 1 && num[0] == '0') {
      printf("0\n");
      return 0;
    }
    is_beautiful = 1;
    if (!found_not_beautiful) {
      is_beautiful = 1;
      if (num[0] != '1') is_beautiful = 0;
      for (int i = 1, second = num.length(); i < second; ++i) {
        if (num[i] != '0') is_beautiful = 0;
      }
    }
    if (is_beautiful)
      num_zeros += num.length() - 1;
    else {
      not_beautiful = num;
      found_not_beautiful = 1;
    }
  }
  string zeros(num_zeros, '0');
  cout << not_beautiful << zeros << endl;
  return 0;
}
