import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static void dfs(int first, int last, char[] in, String create, Set result){ if(first > last){ result.add(create); }else{ dfs(first + 1, last, in, create + in[first], result); dfs(first, last - 1, in, create + in[last], result); } } public static void main(String[] args){ Scanner sc = new Scanner(System.in); final char[] inputs = sc.next().toCharArray(); Set result = new HashSet(); dfs(0, inputs.length - 1, inputs, "", result); System.out.println(result.size()); } }