LearnPy Hub
← Arena
IntermediateRating 1300

Different Substrings

Count the different non-empty substrings (pieces of consecutive characters) of the string.

Input

One string (length ≤ 150).

Output

One integer.

Sample 1

Input
abc
Output
6

Sample 2

Input
aaa
Output
3
solution.py
Output appears here
Different Substrings · Python Arena problem · LearnPy Hub