import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String S = scan.next(); scan.close(); String []s = S.split(""); Set set = new HashSet(); String []t = new String[s.length]; String s0 = s[0]; for(int i = 0; i < s.length; i++) { for(int j = 0; j < s.length; j++) { if(i < j) { t[j] = s[j - 1]; }else if(i == j) { t[j] = s0; }else { t[j] = s[j]; } } set.add(con(t)); } String sn = s[s.length - 1]; for(int i = 0; i < s.length; i++) { for(int j = 0; j < s.length; j++) { if(i < j) { t[j] = s[j]; }else if(i == j) { t[j] = sn; }else { t[j] = s[j + 1]; } } set.add(con(t)); } System.out.println(set.size()); } public static String con(String[] s) { StringBuilder sb = new StringBuilder(); for(int i = 0; i < s.length; i++) { sb.append(s[i]); } return sb.toString(); } }