#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 5;
const long long MAX = 1e18;
int tab[MAXN];
vector<long long> generate(vector<int> primes) {
  vector<long long> ans;
  queue<pair<long long, int>> q;
  q.emplace(1, 0);
  while (!q.empty()) {
    auto x = q.front();
    q.pop();
    ans.push_back(x.first);
    long long y = MAX / x.first;
    for (int i = x.second; i < primes.size(); i++) {
      if (primes[i] > y) break;
      q.emplace(x.first * primes[i], i);
    }
  }
  sort(ans.begin(), ans.end());
  return ans;
}
int cnt(vector<long long> &a, vector<long long> &b, long long z) {
  long long res = 0, ind = b.size() - 1;
  for (auto i : a) {
    while (ind >= 0 && (long double)b[ind] * i > z) --ind;
    if (ind < 0) break;
    res += ind + 1;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int n, p;
  vector<int> v1, v2;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p;
    if (i % 2 == 0)
      v1.push_back(p);
    else
      v2.push_back(p);
  }
  long long k;
  cin >> k;
  vector<long long> a = generate(v1);
  vector<long long> b = generate(v2);
  long long l = 0, r = 1e18;
  while (l < r) {
    long long mid = (l + r) / 2;
    if (cnt(a, b, mid) < k)
      l = mid + 1;
    else
      r = mid;
  }
  cout << l;
}
