#include <bits/stdc++.h>
using namespace std;
vector<long long> v[2], x, y;
void calc(vector<long long> v, vector<long long> &x, int cur, long long val,
          long long lim) {
  if (cur >= v.size()) {
    x.push_back(val);
    return;
  }
  while (lim > 0) {
    calc(v, x, cur + 1, val, lim);
    val *= v[cur];
    lim /= v[cur];
  }
}
int hh(long long z) {
  long long r = 0;
  int ind = 0;
  for (long long a : x) {
    while (ind < y.size() && y[ind] <= z / a) ind++;
    r += ind;
  }
  return r;
}
int main() {
  int n, z;
  long long k;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> z;
    v[i % 2].push_back(z);
  }
  cin >> k;
  calc(v[0], x, 0, 1ll, 1ll * 1000000000 * 1000000000);
  calc(v[1], y, 0, 1ll, 1ll * 1000000000 * 1000000000);
  sort(x.begin(), x.end());
  reverse(x.begin(), x.end());
  sort(y.begin(), y.end());
  long long l = 0, r = 1ll * 1000000000 * 1000000000 + 1;
  while (l < r) {
    long long m = (l + r) / 2;
    if (hh(m) < k)
      l = m + 1;
    else
      r = m;
  }
  if (r != 1ll * 1000000000 * 1000000000 + 1)
    cout << r;
  else
    cout << "-1";
  return 0;
}
