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

~/algor $ cat problems/keyingi-va-oldingi

Next and previous number

Easy 1000 ms 64 MB 5%
Share

An integer $n$ is given. Print the previous number $n - 1$ and the next number $n + 1$.

On the number line, n and its two neighbours: the previous and the next number

Input

One integer $n$.

Output

$n - 1$ on the first line, $n + 1$ on the second line.

Note

$-10^{9} \le n \le 10^{9}$

Examples

Input #1
5
Output #1
4
6
Input #2
0
Output #2
-1
1

Sign in to submit a solution

Signing up is free and takes a minute.