#K65617. Robot Grid Distinct Points
Robot Grid Distinct Points
Robot Grid Distinct Points
A robot starts at a grid point and can move in four cardinal directions. In exactly N
moves, the robot travels to grid points. The task is to compute the number of distinct grid points the robot can reach, given that the positions reachable follow a pattern based on powers of 2.
Mathematically, the number of distinct grid points is given by the formula: \(2^{N+1}\).
For example, if N = 1
, then \(2^{1+1} = 4\) distinct points are reachable. Similarly, for N = 0
, there are \(2^{0+1} = 2\) distinct points.
Your task is to read an integer N
from standard input, compute \(2^{N+1}\), and print the result to standard output.
inputFormat
The input consists of a single integer N
denoting the number of moves.
Input is provided via stdin.
outputFormat
Output the computed number of distinct grid points, which equals \(2^{N+1}\), to stdout.
## sample1
4