import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Main { static Scanner in = new Scanner(System.in); static Set set = new HashSet<>(); public static void main(String[] args) { String s = in.next(); f(s, ""); System.out.println(set.size()); } public static void f(String s1, String s2){ if(s1.length() == 1){ set.add(s2 + s1); }else{ f(s1.substring(0, s1.length() - 1), s2 + s1.charAt(s1.length() - 1)); f(s1.substring(1, s1.length()), s2 + s1.charAt(0)); } } }