#include <bits/stdc++.h>
using namespace std;
long long int v[22];
vector<long long int> ni(20, 0), next_multiple(20, 0), ugly;
vector<long long int> gen[2], in[2];
long long int N, M;
void sol(int op) {
  for (int i = (int)0; i < (int)20; i++) ni[i] = next_multiple[i] = 0;
  for (int i = (int)0; i < (int)in[op].size(); i++)
    next_multiple[i] = in[op][i];
  ugly.clear();
  ugly.push_back(1);
  gen[op].push_back(ugly[0]);
  for (int i = (int)1; i < (int)M; i++) {
    ugly.push_back(1000000000000000010);
    for (int j = (int)0; j < (int)in[op].size(); j++)
      ugly[i] = min(ugly[i], next_multiple[j]);
    if (ugly[i] > 1000000000000000000LL) return;
    gen[op].push_back(ugly[i]);
    for (int j = (int)0; j < (int)in[op].size(); j++) {
      if (ugly[i] == next_multiple[j]) {
        ni[j]++;
        next_multiple[j] = ugly[ni[j]] * in[op][j];
      }
    }
  }
}
long long int check(long long int n) {
  long long int ret = 0;
  long long int qt = 0;
  for (int i = (int)0; i < (int)gen[0].size(); i++) {
    while (qt < gen[1].size() && gen[0][i] <= n / gen[1][qt]) qt++;
    ret += qt;
  }
  return ret;
}
int main() {
  cin >> N;
  for (int i = (int)0; i < (int)N; i++) {
    cin >> v[i];
    in[i % 2].push_back(v[i]);
  }
  cin >> M;
  sol(0);
  sol(1);
  reverse(gen[0].begin(), gen[0].end());
  long long int ini = 0, fim = 1000000000000000000LL, mid, ans;
  while (ini <= fim) {
    mid = (ini + fim) / 2;
    long long int xua = check(mid);
    if (xua >= M) {
      ans = mid;
      fim = mid - 1;
    } else {
      ini = mid + 1;
    }
  }
  cout << ans << '\n';
  return 0;
}
