#include
void main()
{
int k,w;
printf("Input:\n");
scanf("%d%d",&k,&w);
printf("Output:\n");
if(w<=100)
{
if(w%20) w=w-w%20+20;
if(k==1) printf("%.2f",0.80*w/20);
else if(k==2) printf("%.2f",1.2*w/20);
else printf("Input error");
}
else if(w>100)
{
if((w-100)%100) w=w-w%100+100;
if(k==1) printf("%.2f",0.80*5+1.2*(w-100)/100);
else if(k==2) printf("%.2f",1.2*5+2.0*(w-100)/100);
else printf("Input error");
}
else printf("Input error");
}