#include <bits/stdc++.h>
using namespace std;
long long int cons;
long long int check(long long int a) {
  if (a >= cons) a %= cons;
  return a;
}
long long int check2(long long int a) {
  a %= cons;
  if (a < 0) a += cons;
  return a;
}
long long int GCD(long long int a, long long int b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
long long int exp(long long int a, long long int n) {
  if (n == 0) return 1;
  if (n == 1) return check(a);
  long long int b = exp(a, n / 2);
  if (n % 2 == 0) return check(b * b);
  return check(b * check(b * a));
}
const int N = 101000;
long long int val;
vector<long long int> vec[20][65];
vector<long long int> prime1, prime2;
bool checker(long long int a, long long int b) { return (a <= (val / b)); }
void solve(vector<long long int> &primes, vector<long long int> &ans) {
  int n = primes.size();
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= 63; j++) {
      vec[i][j].clear();
    }
  }
  for (int i = 1; i <= n; i++) {
    long long int pi = primes[i - 1];
    long long int cur = 1;
    for (int j = 1; j <= 63; j++) {
      if (checker(cur, pi)) {
        cur = cur * pi;
        vec[i][j].push_back(cur);
      } else
        break;
    }
  }
  for (int i = 1; i <= n; i++) {
    long long int pi = primes[i - 1];
    long long int cur;
    cur = 1;
    for (int l = 1; l <= 63; l++) {
      if (!checker(cur, pi)) break;
      cur = cur * pi;
      for (int j = 1; j <= 63; j++) {
        if (j + l > 63) break;
        for (int k = 1; k < i; k++) {
          for (auto itr : vec[k][j]) {
            if (checker(itr, cur))
              vec[i][j + l].push_back(itr * cur);
            else
              break;
          }
        }
      }
    }
    for (int j = 1; j <= 63; j++) sort(vec[i][j].begin(), vec[i][j].end());
  }
  ans.push_back(1);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= 63; j++) {
      for (auto itr : vec[i][j]) ans.push_back(itr);
    }
  }
  sort(ans.begin(), ans.end());
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cons = 1e9 + 7;
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    long long int pi;
    cin >> pi;
    if (i & 1)
      prime1.push_back(pi);
    else
      prime2.push_back(pi);
  }
  long long int l = 1, r = 1e18;
  long long int ans = 1e18;
  long long int k;
  cin >> k;
  val = 1e18;
  vector<long long int> ans1, ans2;
  solve(prime1, ans1);
  solve(prime2, ans2);
  while (l <= r) {
    long long int mid = (l + r) >> 1;
    val = mid;
    long long int less_than = 0;
    long long int pointer = ans2.size() - 1;
    for (auto itr : ans1) {
      while (pointer >= 0 && !checker(itr, ans2[pointer])) pointer--;
      less_than += pointer + 1;
    }
    if (less_than >= k) {
      r = mid - 1;
      ans = min(ans, mid);
    } else
      l = mid + 1;
  }
  cout << ans;
}
