Under construction

Still being built. Things may change

Chessboard Pieces

Time limit1sMemory limit128 MB

Summary
Given N straight guillotine cuts through a rectangular board, compute the maximum number of resulting pieces.
Level

Easy2 of 10

Topics
Math, Greedy
Solved
No attempts yet

Problem

A chessboard can be cut at most N times. Each cut must be parallel to one side of the board, and it must be a straight cut that runs from one end of the board to the opposite end. After a cut is made, the pieces cannot be moved or rearranged.

Find the maximum number of pieces that can be made under these conditions.

Input

The first line contains an integer N. (1 ≤ N ≤ 100)

Output

Print the maximum number of pieces that can be made.

Examples2

  1. Example 1

    Input
    1
    
    Expected output
    2
    
  2. Example 2

    Input
    3
    
    Expected output
    6