#Z14410. 金币
金币
Description
The king pays gold coins as wages to his loyal knights. On the first day, the knight receives one gold coin; for the next two days (days 2 and 3), he receives two gold coins each day; for the following three days (days 4, 5, and 6), he receives three gold coins each day; for the next four days (days 7, 8, 9, and 10), he receives four gold coins each day...
This wage distribution pattern continues indefinitely: after receiving n gold coins each day for n consecutive days, the knight will receive n+1 gold coins each day for the next n+1 consecutive days (where n is any positive integer).
You need to write a program that calculates the total number of gold coins the knight has received over a given number of days starting from the first day.
Input Format
An integer (ranging from 1 to 10000) representing the number of days.
Output Format
The total number of gold coins received by the knight.
6
14