#include<cstdio>
using namespace std;
#define N 100010
#define M 105
#define ll long long
int n,m,a[N],w[M];
ll ans[N];
int main(){
scanf("%d%d",&m,&n);
for(int i=1;i<=m;i++) scanf("%d",&a[i]),w[i]=1;
ans[1]=1;
for(int i=2;i<=n+1;i++){
ans[i]=0x7fffffff;
for(int j=1;j<=m;j++){
while(a[j]*ans[w[j]]<=ans[i-1]) w[j]++;
if(a[j]*ans[w[j]]<ans[i]) ans[i]=a[j]*ans[w[j]];
}
}
printf("%lld\n",ans[n+1]);
return 0;
}