#include<cstdio>
using namespace std;
int k,n,a[105],f[100005],sum[105],i,j;
int min(int x,int y){return x<y?x:y;}
int Main()
{
freopen("humble.in","r",stdin);freopen("humble.out","w",stdout);
scanf("%d%d",&k,&n);
for(i=1;i<=k;i++)scanf("%d",&a[i]);
f[0]=1;
for(i=1;i<=n;i++)
{
int minn=0x7fffffff;
for(j=1;j<=k;j++)minn=min(minn,f[sum[j]]*a[j]);
f[i]=minn;
for(j=1;j<=k;j++)while(f[sum[j]]*a[j]<=f[i])sum[j]++;
}
printf("%d\n",f[n]);
return 0;
}
int main(){;}
int syy=Main();