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!'
s = raw_input ()
print sum (1 for i in range (len (s)) for j in range (i + 1, len (s) + 1) if s [i:j] == s [i:j][::-1])