COCI '07 Contest 2 #2 Crne

View as PDF

Submit solution


Points: 3
Time limit: 1.0s
Memory limit: 32M

Problem type

Thrilled about his new valid set of pieces, Mirko rushed over to Slavko's, to find that Slavko too found a set of chess pieces in his attic. Slavko's set, miraculously, contains only black pieces. But since neither of them can play chess, they settled on smashing one another senseless with their chessboards.

While Slavko is warming up with a series of stretches, Mirko decided to sabotage Slavko's chessboard. An expert in carving wood, he decided to cut Slavko's chessboard so that it shatters into as many pieces as possible when Slavko attempts to hit Mirko.

Mirko can only make horizontal and vertical cuts (parallel to the sides to the board), edge to edge, and has time to make at most N cuts.

Input Specification

The first line of input contains an integer N (1 \le N \le 100), the number of cuts Mirko can make.

Output Specification

Output the largest number of pieces Slavko's chessboard can crash into.

Sample Input 1

1

Sample Output 1

2

Sample Input 2

3

Sample Output 2

6

Comments

There are no comments at the moment.