#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
char ans[N];
char s[N];
int main() {
  int n;
  while (cin >> n) {
    memset(ans, 0, sizeof(ans));
    ans[0] = '1';
    bool zero = 0;
    for (int i = 0; i < n; i++) {
      scanf("%s", s);
      if (strcmp(s, "1") == 0) continue;
      if (strcmp(s, "0") == 0) zero = true;
      bool tag = 1;
      for (int i = 1; s[i]; i++) {
        if (s[i] != '0') {
          tag = 0;
          break;
        }
      }
      if (tag && s[0] == '1') {
        int L = strlen(s) - 1, top = strlen(ans);
        for (int i = 0; i < L; i++) ans[top++] = '0';
      } else {
        char temp[N];
        strcpy(temp, s);
        strcat(temp, ans + 1);
        strcpy(ans, temp);
      }
    }
    if (zero) strcpy(ans, "0");
    printf("%s\n", ans);
  }
  return 0;
}
