//@author langx
//G++4.4
#include <cstdio>
#include <cstring>
#define SIZE 126
#define LEN 5
int a[SIZE],b[LEN];
int mul( int alen,int blen){
int tmp[SIZE], i, j, k;
memset(tmp,,sizeof(tmp));
for( i = ; i < alen; ++i){
for( j = ; j < blen; ++j){
tmp[i + j] += a[i] * b[j];
}
}
k = alen + blen - ;
for( i = ;i < k; ++i){
if( tmp[i] >= ){
tmp[ i + ] += tmp[i] / ;
tmp[i] = tmp[i] % ;
}
a[i] = tmp[i];
}
a[i] = tmp[i];
if( tmp[k] != )k++;
return k;
}
int main(){
char r[LEN + ];
int n, i, j, len, alen, mark, formark, ok;
while( scanf("%s%d",r, &n) == ){
len = strlen(r);
mark = ;
for( i = len - , j = ; i >= ; --i){
if(r[i]=='.'){
mark =i;continue; //记录小数点位置
}
a[j] = b[j++] = r[i]-'';
}
--len;
mark = len - mark;
alen = len;
for( i = ;i < n; i++){
alen = mul( alen,len);
}
for( i = ; i < alen; ++i){
if( a[i] != )break;
}
mark *= n;
formark = i; //记录后缀,如70.10000
ok = ;
for( i = alen-; i >= formark; --i){
if( a[i] == && i >= mark && !ok )continue;
if( i == mark - ) printf(".");
printf("%d", a[i]);
ok = ;
}
for(formark--; formark >= mark; --formark){
printf("");
}
printf("\n");
}
return ;
}