def dfs(strSet,S,start,end,nowStr): if start > end: strSet.add(nowStr) return dfs(strSet,S,start + 1,end,nowStr + S[start]) dfs(strSet,S,start,end - 1,nowStr + S[end]) S = raw_input() strSet = set([]) dfs(strSet,S,0,len(S) - 1,'') count = 0 for i in strSet: if len(i) == len(S):count+= 1 print count