Food Delivery
Limits: 2 sec., 512 MiB
This statement was translated automatically from Ukrainian. In case of any discrepancy, the Ukrainian version is authoritative.
Zenyk used his favorite food delivery service Slovo. In total, the guy ordered for \(a\) hryvnias. According to the rules of the Slovo company, delivery is free if the order is for at least \(b\) hryvnias, otherwise the delivery cost is \(c\) hryvnias.
Help Zenyk calculate how much he has to pay in total.
Input
The single line contains 3 integers \(a\), \(b\), \(c\) – the order amount, the minimum amount for free delivery, and the delivery cost, respectively.
Output
Print a single number – how much Zenyk has to pay.
Constraints
\(1 \le a, b \le 5000\),
\(1 \le c \le 100\).
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| 744 1000 74 | 818 |
| Input (stdin) | Output (stdout) |
|---|---|
| 1477 1000 74 | 1477 |
Notes
In the first example, Zenyk ordered for less than 1000 hryvnias, so he also needs to pay for delivery.
In the second example, delivery is free.
Submit a solution
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|