~/algor $ cat problems/muzey-chiptasi
Museum ticket
Easy
1000 ms
64 MB
22%
The full price of a museum ticket is $p$ soums. Children under $7$ ($a \lt 7$) enter for free, visitors aged $7$ to $17$ pay half the price, and visitors aged $18$ and older pay the full price. Find how many soums a visitor of age $a$ pays.
Input
One line with two integers: $a$ and $p$.
Output
One integer — the amount to pay.
Note
$0 \le a \le 120$
$2 \le p \le 10^{6}$
$p$ is even.
Examples
Input #1
12 30000
Output #1
15000
Input #2
18 30000
Output #2
30000