54. Gym Membership Cost

Difficulty: easy · Math

Problem

A gym prices its membership by the number of months a customer enrols for: | Months | Cost (₹) | |---|---| | 1 | 2000 | | 2 to 3 | 5000 | | 4 to 6 | 9000 | | more than 6 | 15000 | Given the number of months, print the cost. If the number of months is zero or negative, print `Invalid Input`.

Input

A single line containing the integer `months`.

Output

Print `Cost: <amount>` (for example `Cost: 5000`), or `Invalid Input`.

Example 1

Input:
3
Output:
Cost: 5000

Explanation: 3 months falls in the 2-3 month tier: 5000.

Example 2

Input:
7
Output:
Cost: 15000

Explanation: More than 6 months costs 15000.

Example 3

Input:
0
Output:
Invalid Input

Explanation: Zero months is not a valid enrolment.

Constraints

- -10^9 <= months <= 10^9

Solutions are judged against 3 sample and 10 hidden tests. Sign in to solve it · All problems