#include <bits/stdc++.h>
const double EPS = 1e-24;
const long long int MOD = 1000000007ll;
const double PI = 3.14159265359;
int INF = 2147483645;
template <class T>
T Max2(T a, T b) {
  return a < b ? b : a;
}
template <class T>
T Min2(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T Max3(T a, T b, T c) {
  return Max2(Max2(a, b), c);
}
template <class T>
T Min3(T a, T b, T c) {
  return Min2(Min2(a, b), c);
}
template <class T>
T Max4(T a, T b, T c, T d) {
  return Max2(Max2(a, b), Max2(c, d));
}
template <class T>
T Min4(T a, T b, T c, T d) {
  return Min2(Min2(a, b), Max2(c, d));
}
using namespace std;
vector<string> V;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    V.push_back(s);
  }
  int zeroes = 0;
  int ind = -1;
  for (int i = 0; i < n; i++) {
    bool pass = false;
    bool beau = true;
    int temp = 0;
    int cnt1 = 0;
    int cnt0 = 0;
    for (int j = 0; j < V[i].length(); j++) {
      if (V[i][j] == '1')
        cnt1++;
      else if (V[i][j] == '0')
        cnt0++;
      else {
        beau = false;
        break;
      }
    }
    if (cnt1 > 1) beau = false;
    for (int j = 0; j < V[i].length(); j++) {
      if (V[i][j] == '1') {
        pass = true;
      } else if (V[i][j] == '0' && pass) {
        temp++;
      }
    }
    if (cnt1 == 0 && beau) {
      cout << 0 << endl;
      return 0;
    }
    if (beau) {
      zeroes += temp;
    }
    if (!beau) ind = i;
  }
  if (ind != -1) {
    cout << V[ind];
  } else {
    cout << "1";
  }
  for (int i = 0; i < zeroes; i++) {
    cout << "0";
  }
  cout << endl;
  return 0;
}
