Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/if-taksi-narxi

Taxi fare

Easy 1000 ms 64 MB 22%
Share

A taxi has driven $d$ km. The fare is $6000$ soums for the first $3$ km (even if the ride is shorter than $3$ km) and $2000$ soums for every kilometre after $3$ km. Find the fare in soums.

Step-by-step taxi fare depending on the distance

Input

One positive integer $d$.

Output

One integer — the fare.

Note

$1 \le d \le 1000$

Examples

Input #1
2
Output #1
6000
Input #2
10
Output #2
20000

Sign in to submit a solution

Signing up is free and takes a minute.