#P128. 练21.5  打车费用

练21.5  打车费用

Description

On the weekend, Glaire and her father took a taxi to the amusement park. The taxi fare scheme is as follows:

  • For the first 2 kilometers, the base fare is 6 yuan;
  • For the distance exceeding 2 kilometers, the fare is 1.8 yuan per kilometer;
  • For the distance exceeding 10 kilometers, the fare for the part exceeding 10 kilometers is increased by 50% on top of 1.8 yuan per kilometer.
  • In addition, waiting time is charged: for every 3 minutes of waiting, an extra 1 yuan is charged (less than 3 minutes is not charged).

Input Format

Two integers, representing the driving distance (in kilometers) and the waiting time (in minutes).

Output Format

A single number representing the total fare. If it is a decimal, output to one decimal place; if it is an integer, do not output the decimal part.

Sample

1 3
7