P10843 [HackerEarth] difdif
普及
题目描述

You are given a string S. Find the number of different substrings in S.

Input
One line containing a string S consisting of lowercase Latin letters.

Output
Output one integer - answer to the question.

Constraints
1 ≤ length of S ≤ 1200

SAMPLE INPUT
abc

SAMPLE OUTPUT
6

输入格式

见题面

输出格式

见题面

样例输入
abc SAMPLE
样例输出
6