#K79082. Unique Positions After N Moves
Unique Positions After N Moves
Unique Positions After N Moves
A robot is initially placed on an infinite two-dimensional grid, starting from the origin. In each move, the robot can move one step in any of the four cardinal directions: north, south, east, or west. After making exactly ( N ) moves, determine the total number of unique positions the robot can be at. Through analysis, it can be shown that the number of unique positions is ( (N+1)^2 ), considering the effective range along both axes.
inputFormat
Input consists of a single integer ( N ) (with ( N \geq 1 )), representing the exact number of moves the robot makes.
outputFormat
Output a single integer representing the number of unique positions the robot can be at after exactly ( N ) moves.## sample
1
4