eolymp
bolt
Try our new interface for solving problems
Problems

Substring (Easy)

Substring (Easy)

Given a string s. Count the number of its different substrings. Do not count the empty substring.

Input

One string s consisting of lowercase Latin letters. The string length is no more than 100 characters.

Output

Print the number of different substrings in s.

Time limit 1 second
Memory limit 128 MiB
Input example #1
aaaa
Output example #1
4
Input example #2
abacaba
Output example #2
21