#include <iostream>
using namespace std;
int main(){
int x,y;
double sum;
cin>>x>>y;
if (x==1)
sum=4*y;
else if (x==2)
sum=4.5*y;
else if (x==3)
sum=5*y;
else if (x==4)
sum=2*y;
else
sum=1.5*y;
printf("Total: R$ %.2lf",sum);
return 0;
}