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

~/algor $ cat problems/oddiy-kalkulyator

Simple calculator

Easy 1000 ms 64 MB 20%
Share

An operation number $N$ and two integers $A$ and $B$ are given. Operations: $1$ — addition ($A + B$), $2$ — subtraction ($A - B$), $3$ — multiplication ($A * B$), $4$ — division. Division takes the integer part and drops the fraction (for example, $7$ divided by $2$ is $3$). Find the result of the operation.

The signs of the four arithmetic operations

Input

One line with three integers: $N$, $A$ and $B$.

Output

One integer — the result of the operation.

Note

$1 \le N \le 4$
$-10^{4} \le A, B \le 10^{4}$
When $N = 4$, $B \ne 0$

Examples

Input #1
1 10 5
Output #1
15
Input #2
2 10 5
Output #2
5

Sign in to submit a solution

Signing up is free and takes a minute.