#include<stdio.h>
int main()
{
int amount;
float bank_charges = 0.5,initial_bal;
scanf("%d ,%f",&amount,&initial_bal);
//printf("%f",initial_bal);
if(initial_bal>=0)
{
if( ( ( (amount)5 )==0 ) &&( ((float)(amount+bank_charges))<= initial_bal) )
{
initial_bal = initial_bal - (amount+bank_charges);
printf(".2f",initial_bal);
}
else
printf("%.2f",initial_bal);
}
else
{
printf("%.2f",initial_bal);
}
return 0;
}