#include <bits/stdc++.h>
using namespace std;
long long in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
const long long maxn = 1e6 + 10;
const long long mod = 1e9 + 7;
const long long MAX_VAL = 1e18 + 10;
vector<long long> poss[2], primes[2];
long long k;
inline void recursion(vector<long long> &primes, long long mul, long long cur,
                      vector<long long> &poss) {
  if (cur >= primes.size()) {
    poss.push_back(mul);
    return;
  }
  recursion(primes, mul, cur + 1, poss);
  while (mul <= MAX_VAL / primes[cur]) {
    mul *= primes[cur];
    recursion(primes, mul, cur + 1, poss);
  }
}
inline bool can(long long x) {
  long long cur = (long long)poss[0].size() - 1;
  long long ret = 0;
  for (long long pt = 0; pt < poss[1].size(); pt++) {
    while (cur >= 0 && poss[1][pt] > x / poss[0][cur]) cur--;
    ret += cur + 1;
  }
  return ret >= k;
}
int32_t main() {
  long long n = in();
  for (long long i = 0; i < n; i++) primes[i & 1].push_back(in());
  for (long long i = 0; i < 2; i++) {
    recursion(primes[i], 1, 0, poss[i]);
    sort(poss[i].begin(), poss[i].end());
  }
  k = lin();
  long long low = 0, hi = 1e18;
  while (low + 1 < hi) {
    long long mid = (low + hi) >> 1;
    if (can(mid))
      hi = mid;
    else
      low = mid;
  }
  cout << hi << endl;
}
