1909 出租车计费


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

出租车各地计费不同。一般都有起步价,且根据公里数不同而变化计价规则。某地出租车,开始两公里内,起步价为7元。2公里到5公里之间,计价是5元/公里;5公里到10公里之间,计价是7元/公里;10公里后,计价是9元/公里。假设你设计了该地的出租车计费器,请根据公里数计算所需的费用。

Input

多个整数M,表示出租车行驶的公里数(0<M<=1000)。

Output

A

Sample

Input

7
23
15

Output

36
174
102

Source: qn


Comments

There are no comments at the moment.