#CCBCMCHIN0000019. Giá vé theo tuổi (Ticket Price by Age)

Giá vé theo tuổi (Ticket Price by Age)

Ticket Price by Age

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

A venue sets one ticket price by integer age aa: under 6 is free; 6–17 costs 5000; 18–59 costs 10000; age 60 or more costs 7000. Determine the single applicable price.

Input

One line contains integer age aa.

Output

Print the corresponding integer price without a label or currency symbol.

Subtasks

  • Subtask 1 (20 points): 0≤a≤170\le a\le 17.
  • Subtask 2 (30 points): 0≤a≤590\le a\le 59.
  • Subtask 3 (50 points): 0≤a≤1200\le a\le 120.

Examples

Example 1

Input

5

Output

0

Explanation

The input gives 5. Age 5 is compared with thresholds 6, 18, and 60 in order. Therefore the required output is ['0'].

Example 2

Input

60

Output

7000

Explanation

The input gives 60. Age 60 is compared with thresholds 6, 18, and 60 in order. Therefore the required output is ['7000'].