import sys,heapq input = sys.stdin.buffer.readline S=input() n=len(S) ans=1 for i in range(1,n-1): cur=1 for j in range(i): if i+i-j