Score : 100 points
You are given a string of length N. Calculate the number of distinct substrings of S.
Input is given from Standard Input in the following format:
S
Print the answer.
abcbcba
21
mississippi
53
ababacaca
33
aaaaa
5