题目描述
Problem Description
Takahashi enjoys playing a game where he searches for hidden words. For example, in the word "jikyuuryoku," the word "kyuri" is hidden.
Takahashi is now trying to find hidden words in a string of length $N$. To list the candidates for hidden words, he first decided to calculate the number of "substrings" of this string.
A "substring" of a string $S$ is a string obtained by taking out a certain interval from the string $S$. For example, the substrings of "sunuke" are "su," "nu," "ke," "sunu," "nuke," and "sunuke," which are 6 in total. Note that "suke" or "nus" are not substrings.
Also, it is known that the string $S$ does not contain the same character more than once. Therefore, there will be no case where strings taken out from different places match, like "sho" in "shoubousho."
Input Format
The input is given from the standard input in the following format:
$N$
- The first line contains an integer $N\ (1\ ≦\ N\ ≦\ 1000)$, which represents the length of the string.
Output Format
Output the number of "substrings" of the string of length $N$ in one line. Make sure to include a newline at the end of the output.
Sample Input and Output
Sample Input #1
1
Sample Output #1
1
Sample Input #2
2
Sample Output #2
3
Sample Input #3
3
Sample Output #3
6
Sample Input #4
4
Sample Output #4
10
Notes/Hints
Sample Explanation 3
As shown in the example in the problem statement, there are 6 substrings for "sunuke."
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分