Given a string s, you are asked to find the number of distinct substrings of s. The substrings are considered distinct if they differ in at least one character.
Input
The only line of the input contains the string s (1 ≤ |s| ≤ 1000).
Output
The program should print the number of distinct substrings of s.