using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; using System.Linq; class Magatro { static string S = Console.ReadLine(); static void Main() { HashSet Hs = new HashSet(); int loop = (int)Math.Pow(2, S.Length); for(int i = 0; i < loop; i++) { int L = 0; int R = S.Length - 1; int q = i; string T = ""; for(int j = 0; j < S.Length; j++) { if (q % 2 == 1) { T += S[L]; L++; } else { T += S[R]; R--; } q /= 2; } Hs.Add(T); } Console.WriteLine(Hs.Count); } }