#K81402. Parking Fee Calculator
Parking Fee Calculator
Parking Fee Calculator
Calculate the total parking fee for a car based on the number of hours parked. The fee is computed as follows:
The first hour (or any part of it) costs $5, and each subsequent hour (or part of it) costs $3.
In mathematical terms, if \(N\) represents the number of hours (with \(N = 0\) meaning no parking), the total fee \(F\) is calculated by:
\( F = \begin{cases} 0, & \text{if } N = 0 \\ 5 + 3 \times (N-1), & \text{if } N > 0 \end{cases} \)
Note: Even a fraction of an hour is considered a full hour.
inputFormat
The input consists of a single integer (N) (where (0 \leq N \leq 1000)) which denotes the number of hours the car has been parked. The input is provided via standard input (stdin).
outputFormat
Output a single integer representing the total parking fee. The output should be printed to standard output (stdout).## sample
1
5