#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
long long n, p[3][25], k, cnt[3], a[25], b[3][1500010], num[3];
struct node {
  long long num;
  long long x;
  node() {}
  node(long long a, long long b) {
    num = a;
    x = b;
  }
};
bool operator<(node a, node b) { return a.x > b.x; }
priority_queue<node> q;
bool check(long long x) {
  long long tot = 0;
  for (long long i = 0; i <= num[1]; i++) {
    if (b[1][i] > x) break;
    int l = 0, r = num[0], ans;
    while (l <= r) {
      int mid = (l + r) / 2;
      if (x / b[1][i] >= b[0][mid])
        ans = mid, l = mid + 1;
      else
        r = mid - 1;
    }
    tot += ans + 1;
  }
  return tot >= k;
}
int main() {
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) scanf("%lld", &a[i]);
  sort(a + 1, a + n + 1);
  for (long long i = 1; i <= n; i++) {
    if (i & 1)
      p[0][++cnt[0]] = a[i];
    else
      p[1][++cnt[1]] = a[i];
  }
  scanf("%lld", &k);
  for (long long op = 0; op < 2; op++) {
    long long ans;
    q.push(node(1, p[op][1]));
    if (cnt[op] == 0) continue;
    while (!q.empty()) {
      node t = q.top();
      q.pop();
      ans = t.x;
      b[op][++num[op]] = ans;
      if (inf / t.x >= p[op][t.num]) q.push(node(t.num, t.x * p[op][t.num]));
      if (t.num != cnt[op] && inf / (t.x / p[op][t.num]) >= p[op][t.num + 1])
        q.push(node(t.num + 1, t.x / p[op][t.num] * p[op][t.num + 1]));
    }
    while (!q.empty()) q.pop();
  }
  b[0][0] = b[1][0] = 1;
  long long l = 1, r = inf, ans;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (check(mid))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  check(1);
  printf("%lld", ans);
}
