시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 475 368 334 80.482%

문제

상근이는 3003번에서 동혁이가 발견한 체스판을 톱으로 자르려고 한다.

상근이는 체스판을 최대 N번 자를 수 있으며, 변에 평행하게만 자를 수 있다. 또, 자를 때는 체스판의 그 변의 한쪽 끝에서 다른쪽 끝까지 잘라야 한다. 자른 후에는 조각을 이동할 수 없다.

이때, 최대 몇 조각을 낼 수 있는지 구하는 프로그램을 작성하시오.

입력

첫째 줄에 N이 주어진다. (1 ≤ N ≤ 100)

출력

첫째 줄에 상근이가 얻을 수 있는 조각의 최댓값을 출력한다.

예제 입력 1

3

예제 출력 1

6
W3sicHJvYmxlbV9pZCI6IjMwMDQiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWNjYjRcdWMyYTRcdWQzMTAgXHVjODcwXHVhYzAxIiwiZGVzY3JpcHRpb24iOiI8cD5cdWMwYzFcdWFkZmNcdWM3NzRcdWIyOTQgMzAwM1x1YmM4OFx1YzVkMFx1YzExYyBcdWIzZDlcdWQ2MDFcdWM3NzRcdWFjMDAgXHViYzFjXHVhY2FjXHVkNTVjIFx1Y2NiNFx1YzJhNFx1ZDMxMFx1Yzc0NCBcdWQxYjFcdWM3M2NcdWI4NWMgXHVjNzkwXHViOTc0XHViODI0XHVhY2UwIFx1ZDU1Y1x1YjJlNC48XC9wPlxyXG5cclxuPHA+XHVjMGMxXHVhZGZjXHVjNzc0XHViMjk0IFx1Y2NiNFx1YzJhNFx1ZDMxMFx1Yzc0NCBcdWNkNWNcdWIzMDAgTlx1YmM4OCBcdWM3OTBcdWI5N2MgXHVjMjE4IFx1Yzc4OFx1YzczY1x1YmE3MCwgXHViY2MwXHVjNWQwIFx1ZDNjOVx1ZDU4OVx1ZDU1OFx1YWM4Y1x1YjljYyBcdWM3OTBcdWI5N2MgXHVjMjE4IFx1Yzc4OFx1YjJlNC4gXHViNjEwLCBcdWM3OTBcdWI5N2MgXHViNTRjXHViMjk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