#include<stdio.h>
int main()
{
float x,y ;
scanf("%f %f",&x,&y);
if((int)x%5==0 && (y>=0.0 && y<=2000.0) && y-0.50>x && (x<=2000.0 || x>0.0))
{
printf("%0.2f",y-0.5-x);
}
if(x>y-0.5)
printf("%0.2f",y);
return 0;
}
#include<stdio.h>
int main()
{
float x,y ;
scanf("%f %f",&x,&y);
if((int)x%5==0 && (y>=0.0 && y<=2000.0) && y-0.50>x && (x<=2000.0 || x>0.0))
{
printf("%0.2f",y-0.5-x);
}
if(x>y-0.5)
printf("%0.2f",y);
return 0;
}