#include <bits/stdc++.h>
using namespace std;
vector<long long> mem[2];
int pr[20];
long long lim = 1000000000000000000;
void gen(int in, int ed, long long ls, int f) {
  if (in == ed) return;
  long long cur = 1;
  while ((lim / cur) >= ls) {
    if (cur != 1) mem[f].push_back(cur * ls);
    gen(in + 1, ed, cur * ls, f);
    cur *= pr[in];
  }
}
int bs(long long val, int f) {
  int lo = 0, hi = mem[f].size() - 1, mid;
  while (lo <= hi) {
    mid = (lo + hi) >> 1;
    if (mem[f][mid] > val)
      hi = mid - 1;
    else
      lo = mid + 1;
  }
  if (hi == -1)
    return 0;
  else
    return hi + 1;
}
long long getTot(long long val) {
  long long x, tot = 0;
  for (int i = 0; i < mem[0].size(); i++) {
    x = val / mem[0][i];
    tot += bs(x, 1);
  }
  return tot;
}
int main() {
  int n, m;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> pr[i];
  mem[0].push_back(1);
  mem[1].push_back(1);
  if (n > 10)
    m = 5;
  else
    m = (n / 2);
  gen(0, m, 1, 0);
  gen(m, n, 1, 1);
  sort(mem[0].begin(), mem[0].end());
  sort(mem[1].begin(), mem[1].end());
  long long N = 15;
  cin >> N;
  long long lo = 0, hi = lim + 18, mid;
  while (lo <= hi) {
    mid = (lo + hi) >> 1;
    long long tot = getTot(mid);
    if (tot >= N)
      hi = mid - 1;
    else
      lo = mid + 1;
  }
  cout << lo;
}
