Skip to content

Learning path · Programming Foundations with Python

Back to lesson · Input, variables, and arithmetic

Next Integer

A1300
English

Language

Contribute a translation
Time limit
1000 ms
Memory limit
256 MB
Submissions
8
Correct
7
Solved by
7
AC rate
87.500%

Statement

Read an integer n and print the integer that comes immediately after it.

Input

One integer n, where -1,000,000,000 ≤ n ≤ 1,000,000,000.

Output

Print n + 1.

Examples

Sample input 1
-1
Sample output 1
0
Sample input 2
0
Sample output 2
1
Sample input 3
1
Sample output 3
2