#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
const long long _up = 1e18;
long long a1[N], a2[N];
int num[20];
int n, cnt1, cnt2;
long long k;
void dfs0(int pos, long long prod) {
  if (pos > n) {
    a1[++cnt1] = prod;
    return;
  }
  while (true) {
    dfs0(pos + 1, prod);
    if (prod > _up / (1LL * num[pos]))
      break;
    else
      prod *= num[pos];
  }
}
void dfs1(int pos, long long prod) {
  if (pos > 6) {
    a1[++cnt1] = prod;
    return;
  }
  while (true) {
    dfs1(pos + 1, prod);
    if (prod > _up / (1LL * num[pos]))
      break;
    else
      prod *= num[pos];
  }
}
void dfs2(int pos, long long prod) {
  if (pos > n) {
    a2[++cnt2] = prod;
    return;
  }
  while (true) {
    dfs2(pos + 1, prod);
    if (prod > _up / (1LL * num[pos]))
      break;
    else
      prod *= num[pos];
  }
}
bool check(long long x) {
  int p1, p2;
  long long sum;
  p1 = 1;
  p2 = cnt2;
  sum = 0;
  while (p1 <= cnt1) {
    while (p2 >= 1 && a1[p1] > x / a2[p2]) p2--;
    sum += p2;
    if (p2 == 0) break;
    p1++;
  }
  return sum < k;
}
int main() {
  long long l, r, mid;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &num[i]);
  scanf("%I64d", &k);
  if (n <= 6) {
    cnt1 = 0;
    dfs0(1, 1LL);
    sort(a1 + 1, a1 + cnt1 + 1);
    printf("%I64d\n", a1[k]);
    return 0;
  }
  cnt1 = 0;
  dfs1(1, 1LL);
  cnt2 = 0;
  dfs2(7, 1LL);
  a1[0] = a2[0] = 0;
  sort(a1 + 1, a1 + cnt1 + 1);
  sort(a2 + 1, a2 + cnt2 + 1);
  l = 0;
  r = _up + 1;
  while (r - l > 1) {
    mid = (l + r) >> 1;
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%I64d\n", r);
  return 0;
}
