class Codechef
{
public static void main (String[] args)
{
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
double balance = scanner.nextDouble();
double result;
if (n % 5 == 0 && n < balance){ result =(balance - n) - 0.5;
System.out.println(result);}
if (n % 5 != 0 && n+0.5<= balance){
System.out.println(balance);}
else if (n>balance || n+0.5>balance){
System.out.println("Insufficient transaction");}
}
}