P24277 [AtCoder] Hakata
省选
题目描述

Problem Statement

We have a string S consisting of lowercase English letters.
Bob just thinks about palindromes every day. He decided to choose some of the substrings of S that are palindromes and tell them to Anna.
Anna gets angry if one of the palindromes told by Bob is a substring of another.
How many palindromes can Bob choose while not making Anna angry?

Input

Input is given from Standard Input in the following format:
S

Output

Print the answer.

Constraints

  • $1 \leq |S| \leq 200$
  • S consists of lowercase English letters.

Sample Input 1

ababb

Sample Output 1

3

Three palindromes aba, bab, bb can be chosen.

Sample Input 2

xyz

Sample Output 2

3

Three palindromes x, y, z can be chosen.

Sample Input 3

xxxxxxxxxx

Sample Output 3

1

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
ababb
样例输出
3