#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<stack>
#include<queue>
#include<cstring>
#include<deque>
#define itn int
#define xlm mylove
using namespace std;
int a[101];int chou[100001],sum[100001];
int n,k,Min;
int Main(){
freopen("humble.in","r",stdin);
freopen("humble.out","w",stdout);
cin>>n>>k;
for (int i=1;i<=n;i++){
scanf("%d",&a[i]);
}
chou[0]=1;
for (int i=1;i<=k;i++){
long long Min=100000000000;
for (int j=1;j<=n;j++){
while(a[j]*chou[sum[j]]<=chou[i-1]){
sum[j]++;
}
long long a=a[j]*chou[sum[j]];
Min=min(Min,a);
}
chou[i]=Min;
}
printf("%d",chou[k]);
return 0;
}
int main(){;}
int xlm=Main();