def dfs(strSet,S,start,end,nowStr): if start == end:return nowStr strSet.add(S[start] + dfs(strSet,S,start + 1,end, S[start] + nowStr)) strSet.add(S[end] + dfs(strSet,S,start,end - 1,S[end] + nowStr)) return nowStr 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