#include <bits/stdc++.h>
using namespace std;
int n;
long long k;
vector<int> V;
const long long LIM = 1e18;
int Work(long long x, long long y) {
  if (x == 0) return 0;
  return 1 + Work(x / y, y);
}
int SOL;
vector<int> S1, S2;
vector<long long> obt1, obt2;
bool smaller(long long x, long long y, long long z) {
  if (x <= z / y + 1) {
    return x * y <= z;
  }
  return 0;
}
bool bigger(long long x, long long y, long long z) { return !smaller(x, y, z); }
void backT(vector<int>& that, vector<long long>& obtain, int pos,
           long long cP) {
  if (pos == that.size()) {
    obtain.push_back(cP);
    return;
  }
  while (cP <= LIM) {
    backT(that, obtain, pos + 1, cP);
    if (!smaller(cP, that[pos], LIM)) break;
    cP *= that[pos];
  }
}
long long solve(long long mid) {
  long long res = 0;
  int j = obt2.size() - 1;
  for (int i = 0; i < obt1.size(); ++i) {
    while (j >= 0 && bigger(obt1[i], obt2[j], mid)) {
      j--;
    }
    res += j + 1;
  }
  return res;
}
int32_t main() {
  cin >> n;
  V.resize(n);
  for (int i = 0; i < n; ++i) assert(cin >> V[i]);
  cin >> k;
  long long mn = 1e18 + 2;
  vector<int> A;
  vector<int> B;
  for (int c = 0; c < 1 << V.size(); ++c) {
    long long p1 = 1, p2 = 1;
    bool of = 0;
    A = vector<int>();
    B = vector<int>();
    for (int j = 0; j < V.size(); ++j)
      if ((1 << j) & c) {
        A.push_back(V[j]);
        auto val = Work(LIM, V[j]);
        if (bigger(val, p1, LIM)) of = 1;
        p1 *= val;
      } else {
        B.push_back(V[j]);
        auto val = Work(LIM, V[j]);
        if (bigger(val, p2, LIM)) of = 1;
        p2 *= Work(LIM, V[j]);
      }
    if (max(p1, p2) < mn && !of) {
      mn = max(p1, p2);
      S1 = A;
      S2 = B;
    }
  }
  backT(S1, obt1, 0, 1);
  backT(S2, obt2, 0, 1);
  sort(begin(obt1), end(obt1));
  sort(begin(obt2), end(obt2));
  long long st = 1, dr = 1e18, ans;
  while (st <= dr) {
    auto mid = (st + dr) / 2;
    if (solve(mid) >= k) {
      ans = mid;
      dr = mid - 1;
    } else
      st = mid + 1;
  }
  cout << ans;
}
