Journey
Execution time limit is 1 second
Runtime memory usage limit is 256 megabytes
Cossack Vus plans to travel from Kyiv to Kremenchuk. The direct train from Kyiv to Kremenchuk costs hryvnias. Alternatively, he can travel from Kyiv to Kharkiv for hryvnias and then from Kharkiv to Kremenchuk for hryvnias.
Determine the minimum cost in hryvnias that Cossack Vus needs to pay to reach Kremenchuk, considering both the direct route and the route via Kharkiv.
Input
The input consists of a single line with three integers , , and ().
Output
Output a single integer representing the minimum cost.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 1K
Acceptance rate 59%