import java.io.*; import java.util.*; class Main { static String s; static ArrayList list = new ArrayList(); public static void out (Object o) { System.out.println(o); } public static void solve (String str , int h , int t , int cnt) { if (cnt == s.length()) { if (!list.contains(str)) list.add(str); return; } if (h < s.length()) solve(str + (s.charAt(h) + "") , h + 1 , t , cnt + 1); if (t > 0) solve(str + (s.charAt(t) + "") , h , t - 1 , cnt + 1); } public static void main (String[] args) throws IOException { Scanner sc = new Scanner(System.in); s = sc.nextLine(); solve("", 0, s.length() - 1, 0); out(list.size()); } }