#include <bits/stdc++.h>
using namespace std;
const long long N = 1e18;
void precalc(const vector<long long> &in, vector<long long> &out,
             long long ct = 1, int k = 0, long long boun = N) {
  if (k >= (int)in.size()) {
    out.push_back(ct);
    return;
  }
  while (boun > 0) {
    precalc(in, out, ct, k + 1, boun);
    boun /= in[k];
    ct *= in[k];
  }
}
vector<long long> a1, a2;
long long coun(long long t) {
  long long j = 0;
  long long ans = 0;
  for (auto z : a1) {
    while (j < a2.size() && a2[j] <= t / z) {
      j++;
    }
    ans += j;
  }
  return ans;
}
int main() {
  int n;
  cin >> n;
  vector<long long> arr[2];
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    arr[i % 2].push_back(x);
  }
  precalc(arr[0], a1);
  precalc(arr[1], a2);
  sort(a1.rbegin(), a1.rend());
  sort(a2.begin(), a2.end());
  int k;
  cin >> k;
  long long l = 0, r = N + 2;
  while (l != r) {
    long long m = (l + r) >> 1;
    if (coun(m) < k) {
      l = m + 1;
    } else {
      r = m;
    }
  }
  if (l == N + 2) {
    cout << -1 << endl;
  } else {
    cout << l << endl;
  }
  return 0;
}
