#include <bits/stdc++.h>
using namespace std;
long long INF = 1LL << 60;
vector<long long> s;
void cnt(long long v, int id, vector<int> &P) {
  if (id == int((P).size())) {
    s.push_back(v);
    return;
  }
  if (v <= INF / P[id]) {
    cnt(v * P[id], id, P);
  }
  cnt(v, id + 1, P);
}
int main() {
  int n;
  cin >> n;
  vector<int> P(n);
  for (int &t : P) cin >> t;
  long long k;
  cin >> k;
  vector<int> p1, p2;
  for (int i = 0; i < min(8, n); i++) p1.push_back(P[i]);
  for (int i = 8; i < n; i++) p2.push_back(P[i]);
  cnt(1, 0, p1);
  vector<long long> m1 = s;
  s.clear();
  cnt(1, 0, p2);
  vector<long long> m2 = s;
  s.clear();
  sort(m1.begin(), m1.end());
  sort(m2.begin(), m2.end());
  auto getCnt = [&](long long x) {
    long long r = 0;
    for (auto v : m2) {
      if (v > x) break;
      int p = upper_bound(m1.begin(), m1.end(), x / v) - m1.begin();
      r += p;
    }
    return r;
  };
  long long mn = 1, mx = INF, ans = 1;
  while (mn <= mx) {
    long long md = (mn + mx) / 2;
    if (getCnt(md) < k) {
      mn = md + 1;
    } else {
      mx = md - 1;
      ans = md;
    }
  }
  cout << ans << endl;
}
