#CCBCMCHIN0000036. Cước giao hàng (Delivery Fee)

Cước giao hàng (Delivery Fee)

Delivery Fee

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

A delivery service charges a single fee based on weight ww in grams: 15000 VND for w≤1000w\le1000; 25000 VND for 1000<w≤30001000<w\le3000; and 40000 VND for w>3000w>3000. Find the fee.

Input

One integer ww is the package weight in grams.

Output

Print one integer: the delivery fee in VND.

Subtasks

Subtask 1 (20 points): Package weight w is in [1,1000] grams. Subtask 2 (30 points): Package weight w is in [1,3000] grams. Subtask 3 (50 points): Package weight w is in [1,10000] grams.

Examples

Example 1

Input

1000

Output

15000

Explanation

A weight of 1000 grams belongs to the first fee tier.

Example 2

Input

3001

Output

40000

Explanation

A weight of 3001 grams exceeds both thresholds and uses the last tier.