#include <bits/stdc++.h>
using namespace std;
long long q1[2020202], q2[2020202];
int id[22], a[22];
int p1[22], p2[22];
int cnt1, cnt2, n1, n2;
int main() {
  int n;
  long long k, INF = (long long)1e18 + 10;
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  cin >> k;
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (i & 1)
      p2[n2++] = a[i];
    else
      p1[n1++] = a[i];
  }
  q1[cnt1++] = 1, q2[cnt2++] = 1;
  for (int i = 0; i < 22; i++) id[i] = 0;
  while (n1) {
    long long s = INF, d;
    for (int i = 0; i < n1; i++) {
      if (s / p1[i] < q1[id[i]]) continue;
      if ((d = p1[i] * q1[id[i]]) < s) s = d;
    }
    if (s == INF) break;
    q1[cnt1++] = s;
    for (int i = 0; i < n1; i++) {
      while (id[i] < cnt1 - 1 && q1[id[i]] <= s / p1[i]) id[i]++;
    }
  }
  for (int i = 0; i < 22; i++) id[i] = 0;
  while (n2) {
    long long s = INF, d;
    for (int i = 0; i < n2; i++) {
      if (s / p2[i] < q2[id[i]]) continue;
      if (p2[i] * q2[id[i]] < s) s = p2[i] * q2[id[i]];
    }
    if (s == INF) break;
    q2[cnt2++] = s;
    for (int i = 0; i < n2; i++) {
      while (id[i] < cnt2 - 1 && q2[id[i]] <= s / p2[i]) id[i]++;
    }
  }
  long long st = 0, ed = INF;
  while (ed - st > 1) {
    long long md = st + ed >> 1;
    long long tmp = 0, ee = cnt2 - 1;
    for (int i = 0; i < cnt1; i++) {
      if (q1[i] > md) break;
      while (ee >= 0 && q2[ee] > md / q1[i]) ee--;
      tmp += ee + 1;
    }
    if (tmp >= k)
      ed = md;
    else
      st = md;
  }
  cout << ed << endl;
  return 0;
}
