#include<cstdio>
#include<iostream>
#include<cstring>
#define fre freopen("cjzd.in","r",stdin);freopen("cjzd.out","w",stdout);
#define fcl fclose(stdin);fclose(stdout);
using namespace std;
long long _pow(int x){long long tot=1;while(x--)tot*=10;return tot;}
int ain();
int xx=ain();
int main(){;}
int ain(){
fre
int kk,n,cnt=1;scanf("%d%d",&n,&kk);
if(n<=kk){putchar('0');return 0;}kk+=2;
long long sum[41][41],x,f[41][7];
char s[31];scanf("%s",s+1);
for(int i=1;i<=n;i++){
x=0;
for(int j=i;j<=n;j++)
sum[i][j]=x=x*10+s[j]-48;
}
memset(f,0,sizeof(f));f[0][0]=1;
for(int i=1;i<=n;i++)//前几位数
for(int j=1;j<kk&&j<=i;j++)//多少划分
for(int k=j-1;k<i;k++)//动态转移
if(x=f[k][j-1]*sum[k+1][i],x>f[i][j])f[i][j]=x;
printf("%lld",f[n][kk-1]);
fcl
}