#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, -1, -1, 1, 1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
template <class T>
inline T biton(T n, T pos) {
  return n | ((T)1 << pos);
}
template <class T>
inline T bitoff(T n, T pos) {
  return n & ~((T)1 << pos);
}
template <class T>
inline T ison(T n, T pos) {
  return (bool)(n & ((T)1 << pos));
}
template <class T>
inline T gcd(T a, T b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <typename T>
string NumberToString(T Number) {
  ostringstream second;
  second << Number;
  return second.str();
}
inline int nxt() {
  int aaa;
  scanf("%d", &aaa);
  return aaa;
}
inline long long int lxt() {
  long long int aaa;
  scanf("%lld", &aaa);
  return aaa;
}
inline double dxt() {
  double aaa;
  scanf("%lf", &aaa);
  return aaa;
}
template <class T>
inline T bigmod(T p, T e, T m) {
  T ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % m;
    p = (p * p) % m;
  }
  return (T)ret;
}
int ar[1000010];
vector<long long int> v[2];
map<long long int, int> mp;
vector<int> prime;
void dfs(int pos, long long int tmp, int f) {
  if (pos >= prime.size()) {
    v[f].push_back(tmp);
    return;
  }
  dfs(pos + 1, tmp, f);
  if (prime[pos] <= ((long long int)1e18 + 1000) / tmp)
    dfs(pos, tmp * prime[pos], f);
}
long long int go(long long int prod) {
  long long int sum = 0;
  for (int i = 0; i < v[0].size(); i++) {
    long long int need = prod / v[0][i];
    int l = upper_bound(v[1].begin(), v[1].end(), need) - v[1].begin();
    l--;
    sum += (l + 1);
  }
  return sum;
}
int main() {
  int n = nxt();
  for (int i = 0; i < n; i++) {
    ar[i] = nxt();
  }
  sort(ar, ar + n);
  for (int i = 0; i < min(5, n); i++) {
    prime.push_back(ar[i]);
  }
  dfs(0, 1LL, 0);
  prime.clear();
  for (int i = min(5, n); i < n; i++) {
    prime.push_back(ar[i]);
  }
  dfs(0, 1LL, 1);
  sort(v[0].begin(), v[0].end());
  sort(v[1].begin(), v[1].end());
  v[0].erase(unique(v[0].begin(), v[0].end()), v[0].end());
  v[1].erase(unique(v[1].begin(), v[1].end()), v[1].end());
  long long int k = lxt();
  long long int lo = 1;
  long long int hi = (long long int)1e18 + 100;
  while (lo <= hi) {
    long long int mid = (lo + hi) / 2;
    if (go(mid) >= k)
      hi = mid - 1;
    else
      lo = mid + 1;
  }
  cout << lo << endl;
  return 0;
}
