wqc mygrlbiadhzlabefvjtghfrtydurkpmoveczbqzzlenezq
3
 48

def reverse(s,i,f):
    a=""
    b=""
    for j in range(i,f):
        b+=s[j]
    for j in range(f-1,i-1,-1):
        a+=s[j]
    if(a==b and i!=f):
        return 1
    return 0
def count(s):
    i=-1
    total=0
    while(i<len(s)):
        i+=1
        f=len(s)
        while(i<=f):
            if(reverse(s,i,f)):
                    total+=1     
            f-=1
    return total
string=raw_input()
print count(string)