#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
template <class T>
inline void gn(T &first) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), first = 0; c >= '0' && c <= '9';
       c = getchar())
    first = (first << 1) + (first << 3) + c - '0';
  if (sg) first = -first;
}
template <class T>
inline void print(T first) {
  if (first < 0) {
    putchar('-');
    return print(-first);
  }
  if (first < 10) {
    putchar('0' + first);
    return;
  }
  print(first / 10);
  putchar(first % 10 + '0');
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
int p[2][11], nn[2], na[2];
long long arr[2][2000222];
long long mul[11];
void search(int k) {
  arr[k][na[k]++] = 1;
  if (nn[k] == 0) return;
  for (int i = 0; i < nn[k]; i++) mul[i] = 0;
  long long nxt = 1, pre = nxt;
  while (true) {
    nxt = 0x3f3f3f3f3f3f3f3fLL;
    for (int i = 0; i < nn[k]; i++)
      if (0x3f3f3f3f3f3f3f3fLL / arr[k][mul[i]] > p[k][i])
        smin(nxt, arr[k][mul[i]] * p[k][i]);
    arr[k][na[k]++] = nxt;
    for (int i = 0; i < nn[k]; i++)
      if (arr[k][mul[i]] == nxt / p[k][i]) {
        mul[i]++;
      }
    if (nxt == pre) break;
    pre = nxt;
  }
}
long long calc(long long u) {
  long long ans = 0;
  for (int i = 0; i < na[1]; i++) {
    ans += upper_bound(arr[0], arr[0] + na[0], u / arr[1][i]) - arr[0];
  }
  return ans;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%d", &p[i & 1][nn[i & 1]++]);
  search(0);
  search(1);
  long long ans, st = 0, ed = 0x3f3f3f3f3f3f3f3fLL, mid, k;
  cin >> k;
  while (ed > st + 1) {
    mid = st + ed >> 1;
    if (calc(mid) < k)
      st = mid;
    else
      ed = mid;
  }
  cout << ed << endl;
  return 0;
}
