Avoid Anagrams

아직 제출이 없습니다시간 제한1초메모리 제한64 MB

문제

A pair of strings form an anagram if the first of them can be transformed into the second by a permutation of letters. For example, "listen" and "silent" form an anagram, but "master" and "nearest" do not.

A subsequence of string s=s_1s_2s_ns = s\_1 s\_2 \dots s\_n is a string s_a_1s_a_2s_a_ks\_{a\_1} s\_{a\_2} \dots s\_{a\_k}, where 1a_1<a_2<<a_kn1 \le a\_1 < a\_2 < \dots < a\_k \le n.

Given string ss, determine the maximal number of its subsequences which can be written down such that no pair of strings in the resulting list does form an anagram.

입력

A single line containing string ss of at most 6060 small latin letters.

출력

Print one number --- the answer.

힌트

In the first sample the resulting list of strings may be: "j", "o", "jj", "jo", "oo", "jjo", "joo", "jojo".