#include<bits/stdc++.h>
using namespace std;
long long m,n,a[100005],b[100005],ans[100005];
int main()
{
freopen ("humble.in","r",stdin);
freopen ("humble.out","w",stdout);
scanf("%d%d",&m,&n);
for (int i=1;i<=m;i++)
{
scanf("%d",&a[i]);
b[i]=1;
}
ans[1]=1;
for (int i=2;i<=n+1;i++)
{
ans[i]=10000000000;
for (int j=1;j<=m;j++)
{
while (a[j]*ans[b[j]]<=ans[i-1])
b[j]++;
if (a[j]*ans[b[j]]<ans[i])
ans[i]=a[j]*ans[b[j]];
}
}
printf("%d",ans[n+1]);
return 0;
}