Preparando MOJI

Lazy Caterer Sequence

2000ms 65536K

Description:

Lazy caterer sequence is defined as the maximum number of pieces formed when slicing a convex pancake with n cuts (each cut is a straight line). The formula is Cn = n·(n + 1) / 2 + 1. You are given n; calculate n-th element of the sequence.

Input:

The only line of the input contains an integer n (0 ≤ n ≤ 100).

Output:

Output the n-th element of lazy caterer sequence.

Sample Input:

2

Sample Output:

4

Sample Input:

5

Sample Output:

16

Informação

Codeforces

Provedor Codeforces

Código CF661A

Tags

*special

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 09:05:54

Relacionados

Nada ainda