Colorful String
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

The value of a string ss is equal to the number of different letters which appear in this string.

Your task is to calculate the total value of all the palindrome substring.

输入描述:

The input consists of a single string
The string s only contains lowercase letters.

输出描述:

Output an integer that denotes the answer.
示例1

输入

复制
abac

输出

复制
6