#include <bits/stdc++.h>
using namespace std;
template <class T>
bool umin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool umax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
int arr[100009];
int beat(string f) {
  for (int i = 1; i < f.size(); i++)
    if (f[i] != '0') return -1;
  if (f[0] != '1') return -1;
  return 1;
}
int main() {
  int a, d = 0;
  cin >> a;
  string number = "&&&", k;
  int zero = 0;
  for (int i = 0; i < a; i++) {
    cin >> k;
    if (k == "0") {
      printf("0\n");
      return 0;
    }
    if (beat(k) != -1)
      zero += int(k.size() - 1);
    else
      number = k;
  }
  if (number == "&&&")
    printf("1");
  else
    cout << number;
  for (int i = 0; i < zero; i++) printf("0");
  printf("\n");
  return 0;
}
