wqc mygrlbiadhzlabefvjtghfrtydurkpmoveczbqzzlenezq
3
 48

i=raw_input()
s=''
n=[]
for j in range(0,len(i)):
	s=''
	for k in range(j,len(i)):
		s=s+i[k]
		n.append(s)
s='p'
count=0
for p in n:
	if p==p[::-1]:
		count+=1
print count