wqc mygrlbiadhzlabefvjtghfrtydurkpmoveczbqzzlenezq
3
 48

n=raw_input()
counter=0
k=0
for i in range(len(n)-1):
    k=i+1
    
    for j in range(len(n)-i):
        if(n[i:k]==n[k:i:-1]):
            
            counter+=1
        k+=1
    
print(counter+len(n))