#include <bits/stdc++.h>
using namespace std;
inline void readInt(int &num) {
  num = 0;
  int c = getchar();
  int s = 1;
  if (c == '-') {
    s = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    num = num * 10 + (c - '0');
    c = getchar();
  }
  num *= s;
}
inline void printInt(int num) {
  string s = "";
  if (num < 0) {
    putchar('-');
    num = -num;
  }
  if (num == 0) putchar('0');
  while (num) {
    s += '0' + num % 10;
    num /= 10;
  }
  for (int i = s.size() - 1; i >= 0; i--) {
    putchar(s[i]);
  }
}
inline void readLL(long long &num) {
  num = 0;
  int c = getchar();
  int s = 1;
  if (c == '-') {
    s = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    num = num * 10 + (c - '0');
    c = getchar();
  }
  num *= s;
}
inline void printLL(long long num) {
  string s = "";
  if (num < 0) {
    putchar('-');
    num = -num;
  }
  if (num == 0) putchar('0');
  while (num) {
    s += '0' + num % 10;
    num /= 10;
  }
  for (int i = s.size() - 1; i >= 0; i--) {
    putchar(s[i]);
  }
}
inline void readString(string &s) {
  s = "";
  char c = getchar();
  while (c != ' ' && c != '\n' && c != EOF) {
    s += c;
    c = getchar();
  }
}
inline void readLine(string &s) {
  s = "";
  char c = getchar();
  while (c != '\n' && c != EOF) {
    s += c;
    c = getchar();
  }
}
inline void printString(const string &s) {
  for (int i = 0; i < (int)s.size(); i++) putchar(s[i]);
}
int main() {
  int n;
  readInt(n);
  string str;
  string zeroes = "";
  string ugly = "";
  bool is_find = false;
  for (int i = 0; i < (int)n; i++) {
    string temp;
    readString(temp);
    if (temp.size() == 1 && temp[0] == '0') {
      putchar('0');
      return 0;
    } else if (!is_find) {
      if (temp[0] != '1') {
        ugly = temp;
        is_find = true;
      } else if (temp.size() > 1) {
        string tz = "";
        for (int i = 1; i < temp.size(); i++)
          if (temp[i] != '0') {
            ugly = temp;
            is_find = true;
            break;
          } else
            tz += "0";
        if (!is_find) zeroes += tz;
      }
    } else if (temp.size() > 1) {
      for (int j = 1; j < temp.size(); j++) zeroes += "0";
    }
  }
  string ans = (is_find) ? ugly + zeroes : "1" + zeroes;
  printString(ans);
  return 0;
}
