import java.util.*; public class Main { static HashSet set = new HashSet<>(); public static void main (String[] args) { Scanner sc = new Scanner(System.in); char[] arr = sc.next().toCharArray(); search(arr, "", 0, arr.length, true); search(arr, "", -1, arr.length - 1, false); System.out.println(set.size()); } static void search(char[] arr, String str, int left, int right, boolean isLeft) { if (left == right) { set.add(str); return; } if (isLeft) { str += arr[left]; } else { str += arr[right]; } search(arr, str, left + 1, right, true); search(arr, str, left, right - 1, false); } }