wqc mygrlbiadhzlabefvjtghfrtydurkpmoveczbqzzlenezq
3
 48

string = raw_input()

x = []

for i in range(len(string)):
	for j in range(i, len(string) + 1):
		a = string[i : j]
		if a and a == a[::-1]:
			x.append(a)


print len(x)