#P6875. Counting Regions Formed by Non-Intersecting Circles on the x-axis

    ID: 20082 Type: Default 1000ms 256MiB

Counting Regions Formed by Non-Intersecting Circles on the x-axis

Counting Regions Formed by Non-Intersecting Circles on the x-axis

Given n circles whose centers lie on the x-axis, and the circles do not intersect (although they may touch), determine how many regions the circles divide the plane into.

Mathematically, you are given an integer \(n\) representing the number of circles. Since the circles do not intersect, each new circle simply adds one additional region to the plane. Thus, the number of regions is given by:

[ R = n + 1 ]

For example, when \(n = 1\), the circle divides the plane into 2 regions; when \(n = 2\), the circles partition the plane into 3 regions, and so on.

inputFormat

The input consists of a single integer \(n\) (\(0 \leq n \leq 10^9\)).

outputFormat

Output a single integer representing the number of regions into which the plane is divided.

sample

1
2