import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.TreeSet; public class Main { static TreeSet mList = new TreeSet(); public static void main(String[] args) throws IOException { BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); String s = r.readLine(); String v = ""; solve(s, v); System.out.println(mList.size()); } static void solve(String s, String v) { if(s.length() == 0) { mList.add(v); return; } String l,r; int len = s.length(); //前の文字をとる l = s.substring(0, 1); r = s.substring(1); solve(r, v+l); //後ろの文字を取る l = s.substring(0, len-1); r = s.substring(len-1); solve(l, v+r); } }