wqc mygrlbiadhzlabefvjtghfrtydurkpmoveczbqzzlenezq
3
 48

'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
# print 'Hello World!'

str1 = raw_input()
combinat = []

def combinations(str1, i, l):
	ret = []
	exit = 0
	for k in range(0, l, 1):
		im = []
		for j in range(k, k+i-1):
			if j < l:
				im.append(str1[j])
			else:
				exit = 1
				break
		if exit != 1 and im != []:
			ret.append(im)
	return ret

l = len(str1)
for i in range(1, l + 1):
	els = combinations(str1, i, l)
	combinat.extend(els)

count = 0

for i in range(len(combinat)):
	c1 = combinat[i][-1::-1]
	if c1 == combinat[i]:
		count += 1
print count