import java.util.*; public class Main { static HashSet all = new HashSet<>(); public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] arr = sc.next().toCharArray(); calc(new StringBuilder(), arr, 0, arr.length - 1); System.out.println(all.size()); } static void calc(StringBuilder sb, char[] arr, int left, int right) { if (left > right) { all.add(sb.toString()); return; } sb.append(arr[left]); calc(sb, arr, left + 1, right); sb.deleteCharAt(sb.length() - 1); sb.append(arr[right]); calc(sb, arr, left, right - 1); sb.deleteCharAt(sb.length() - 1); } }