High School Programming League 2008/2009

ATM

Problem code: HS08TEST

Julia would like to withdraw X € from an ATM. The cash machine will only accept the transaction if X is a multiple of 5, and Julia's account balance is sufficient to perform the withdrawal transaction (including bank charges). Calculate Julia's account balance after an attempted transaction, if you know that for an accepted transaction the bank makes a charge of 0.50 €.

Input

Positive integer 0 < X <= 2000 - the amount of cash which Julia wishes to withdraw.

Nonnegative number 0<= Y <= 2000 with two digits of precision - Julia's initial account balance.

Output

Output the account balance after the attempted transaction, given as a number with two digits of precision.

Example1

Input:
30 120.00

Output:
89.50

Example2

Input:
300 120.00

Output:
120.00

Scoring

This is a test problem and you will receive no points for solving it. However, at 12:00 on Saturday, September 27, we will give out small gifts to some users, drawn from among those registered contestants who have solved this problem in more programming languages available at SPOJ then all other registered contestants. See the "prizes" tab for more details. Note: the special contest is over now.


Added by:Łukasz Kuszner
Date:2008-09-07
Time limit:1s
Source limit:50000B
Languages:SED C99 strict C++ 4.3.2 TCL SCALA NEM PHP SCM guile LISP sbcl LISP clisp ERL TECS TEXT DOC PDF PS PERL 6 JS
Resource:SPOJ High School Programming League 2008/2009
SPOJ System © 2008-2009 Sphere Research Labs. All Rights Reserved.