import sequtils,strutils,math var S = stdin.readline ans = 0 p = 0.0 while p.int <= S.high: var cnt : int for i,c in S: if (p * 2).int - i < 0: break if (2 * p).int - i <= S.high and c == S[(2 * p).int - i]: cnt += 1 ans = max(ans, cnt) p += 0.5 echo ans