#C2684. Minimal Moves: Rearranging Books
Minimal Moves: Rearranging Books
Minimal Moves: Rearranging Books
Bob has a collection of N books that he wishes to rearrange using a series of moves. The task is to compute the minimal number of moves required to rearrange these books. The rule is defined as follows:
For (N = 1), the minimal moves is 0. For any (N > 1), the minimal moves required is given by the formula:
[ \text{moves} = 2N - 1 ]
Your program should read a single integer from standard input representing the number of books and output the computed minimal number of moves to standard output.
inputFormat
The input consists of a single integer (N) ((1 \leq N \leq 10^9)) representing the number of books.
outputFormat
Output a single integer representing the minimal number of moves required to rearrange the (N) books.## sample
1
0