#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 100005;
vector<long long> v1, v2;
int n;
long long p[20];
long long k;
void dfs(int dep, int maxnum, long long now, vector<long long>& v) {
  if (dep > maxnum) {
    v.push_back(now);
    return;
  }
  while (1) {
    dfs(dep + 1, maxnum, now, v);
    if (now > 1e18 / p[dep]) break;
    now *= p[dep];
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> p[i];
  cin >> k;
  sort(p + 1, p + n + 1);
  dfs(1, min(6, n), 1, v1);
  dfs(min(6, n) + 1, n, 1, v2);
  sort(v1.begin(), v1.end());
  sort(v2.begin(), v2.end());
  long long LL = 1, RR = 1e18, ans = -1;
  while (LL <= RR) {
    long long Mid = (LL + RR) >> 1;
    long long cnt = 0;
    for (long long x : v1)
      cnt += upper_bound(v2.begin(), v2.end(), Mid / x) - v2.begin();
    if (cnt >= k)
      ans = Mid, RR = Mid - 1;
    else
      LL = Mid + 1;
  }
  cout << ans << endl;
  return 0;
}
