#include <bits/stdc++.h>
using namespace std;
string line, ans;
int main(void) {
  int n;
  while (scanf("%d", &n) == 1) {
    int i = 1;
    bool shouldbBeZero = false;
    int totalNumOfZero = 0;
    ans = "1";
    while (i <= n) {
      cin >> line;
      if (line[0] == '0') {
        i++;
        shouldbBeZero = true;
        continue;
      }
      int j = 0;
      int counter = 0;
      int len = line.size();
      bool notBeautiful = true;
      while (j < len) {
        if (line[j] == '0') {
          counter++;
        } else if (line[j] != '1') {
          notBeautiful = false;
          ans = line;
          break;
        }
        j++;
      }
      if (len - counter != 1) {
        ans = line;
      } else {
        totalNumOfZero = totalNumOfZero + counter;
      }
      i++;
    }
    if (shouldbBeZero == true) {
      printf("0\n");
    } else {
      cout << ans;
      i = 1;
      while (i <= totalNumOfZero) {
        printf("0");
        i++;
      }
      cout << endl;
    }
  }
  return 0;
}
