wqc mygrlbiadhzlabefvjtghfrtydurkpmoveczbqzzlenezq
3
 48

def find_all(iterable):
    s = tuple(iterable)
    for size in range(1, len(s)+1):
        for index in range(len(s)+1-size):
            yield iterable[index:index+size]

if __name__=='__main__':
    all_list = find_all(raw_input())
    count = 0
    #lst = []
    for i in all_list:
        if i==i[::-1]:
            #lst.append(i)
            count += 1
    #print(lst)
    print count