S=input() a=0 while i < len(S)-3: if S[i]==S[i+2]: j=0 c=0 while i-j>=0 and i+ja: a=c while i=0 and i+ja: a=c print(a)