#include <bits/stdc++.h>
using namespace std;
const long long Inf = 1e18;
inline int read() {
  int s = 0, m = 0;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') m = 1;
    ch = getchar();
  }
  while (isdigit(ch)) s = (s << 3) + (s << 1) + (ch ^ 48), ch = getchar();
  return m ? -s : s;
}
long long n, K;
vector<long long> v[3];
long long p[20], Sz[3];
void Dfs(int rt, int now, long long ss) {
  if (now > n) {
    v[rt].push_back(ss), ++Sz[rt];
    return;
  }
  for (long long w = 1;; w *= p[now]) {
    Dfs(rt, now + 2, ss * w);
    if ((1e18) / p[now] < w * ss) return;
  }
}
int main() {
  n = read(), v[1].push_back(0), v[2].push_back(0);
  for (register int i = 1; i <= n; ++i) p[i] = read();
  sort(&p[1], &p[n + 1]), Dfs(1, 1, 1), Dfs(2, 2, 1);
  sort(&v[1][1], &v[1][Sz[1] + 1]);
  sort(&v[2][1], &v[2][Sz[2] + 1]);
  long long le = 1, ri = 1e18, mid, tot, Ans;
  K = read();
  while (le <= ri) {
    mid = (le + ri) >> 1, tot = 0;
    for (register int i = 1, j = Sz[2]; i <= Sz[1] && j >= 1; ++i, tot += j)
      while (j && mid / v[1][i] < v[2][j]) --j;
    if (tot < K)
      le = mid + 1;
    else
      Ans = mid, ri = mid - 1;
  }
  return printf("%lld\n", Ans), 0;
}
