import java.math.*; import java.util.*; public class Main { static Set ans; static void dfs(String to,String moto){ if(moto.equals("")){ ans.add(to); return; } String temp = to + moto.charAt(0); dfs(temp, moto.substring(1,moto.length())); temp=to+moto.charAt(moto.length()-1); dfs(temp, moto.substring(0,moto.length()-1)); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); ans=new HashSet<>(); String string = sc.next(); dfs("", string); System.out.println(ans.size()); } }