int main()
{
double a,m;
int b;
char c;
scanf("%lf %d %c",&a,&b,&c);
switch(b)
{
case 90:
m=a*6.95;break;
case 93:
m=a*7.44;break;
case 97:
m=a*7.93;
default:
m=0;break;
}
if(c=='m')
m*=0.95;
else if(c=='c')
m*=0.97;
else
;
printf("money : %.2f\n",m);
return 0;
}