rt
#include<bits/stdc++.h>
#define int long long
using namespace std;
int n, k, maxn, a[105];
bool p[105];
string s;
void dfs(int step, int cnt){
if(cnt > k){
return;
}
if(step >= n){
if(cnt != k){
return;
}
int sum = 1, pre = 0;
for(int i = 1; i <= n; i++){
pre *= 10;
pre += a[i];
if(p[i] == 1){
sum *= pre;
pre = 0;
}
}
if(pre != 0){
sum *= pre;
}
maxn = max(sum, maxn);
return;
}
p[step] = 1;
dfs(step + 1, cnt + 1);
p[step] = 0;
dfs(step + 1, cnt);
}
signed main(){
cin >> n >> k >> s;
for(int i = 0; i < n; i++){
a[i + 1] = s[i] - '0';
}
dfs(1, 0);
cout << maxn;
return 0;
}