#include <bits/stdc++.h>
using namespace std;
long long maximum = (long long)1e18;
long long overflow = LLONG_MAX;
void subset(vector<long long> &prime, vector<long long> &sets, int index,
            long long value) {
  if (index == prime.size())
    sets.push_back(value);
  else {
    while (value <= maximum) {
      subset(prime, sets, index + 1, value);
      if (overflow / value <= prime[index]) break;
      value *= prime[index];
    }
  }
}
long long bisearch(vector<long long> &sets, long long value) {
  auto k = upper_bound(sets.begin(), sets.end(), value);
  long long want = k - sets.begin();
  return want;
}
long long Kst(vector<long long> &set1, vector<long long> &set2,
              long long value) {
  long long k = 0;
  for (int i = 0; i < set1.size(); i++) {
    long long j = bisearch(set2, value / set1[i]);
    if (j == 0) break;
    k += j;
  }
  return k;
}
void print(vector<long long> &sets) {
  for (int i = 0; i < 20; i++) {
    cout << sets[i] << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  vector<long long> temp;
  temp.push_back(1);
  temp.push_back(2);
  temp.push_back(3);
  vector<long long> prime1;
  vector<long long> prime2;
  vector<long long> set1;
  vector<long long> set2;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long p;
    cin >> p;
    if (i % 2 == 0) {
      prime1.push_back(p);
    } else {
      prime2.push_back(p);
    }
  }
  long long k;
  cin >> k;
  subset(prime1, set1, 0, (long long)1);
  subset(prime2, set2, 0, (long long)1);
  sort(set1.begin(), set1.end());
  sort(set2.begin(), set2.end());
  long long start = 1;
  long long end = maximum;
  while (start != end) {
    long long mid = (start + end) / 2;
    if (Kst(set1, set2, mid) >= k) {
      end = mid;
    } else {
      start = mid + 1;
    }
  }
  cout << start;
  return 0;
}
