#include <bits/stdc++.h>
using namespace std;
vector<long long> a[2];
long long p[20], k;
int n;
void dfs(int m, int r, long long t, int q) {
  if (m > r) {
    a[q].push_back(t);
    return;
  }
  for (;;) {
    dfs(m + 1, r, t, q);
    if (1e18 / p[m] < t) return;
    t *= p[m];
  }
}
int main() {
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%lld", &p[i]);
  dfs(1, min(n, 6), 1, 0), dfs(min(n, 6) + 1, n, 1, 1);
  for (i = 0; i < 2; ++i) sort(a[i].begin(), a[i].end());
  reverse(a[0].begin(), a[0].end());
  long long l = 1, r = 1e18;
  scanf("%lld", &k);
  for (; l <= r;) {
    long long mid = (l + r) >> 1, cnt = 0;
    for (i = 0, j = 0; i < a[0].size(); ++i) {
      for (; j < a[1].size() && mid / a[0][i] >= a[1][j]; ++j)
        ;
      cnt += j;
    }
    cnt >= k ? r = mid - 1 : l = mid + 1;
  }
  printf("%lld", l);
}
