Problem: Hongcow is learning to spell! One day, his teacher gives him a word that he needs to learn to spell. Being a dutiful student, he immediately learns how to spell the word.

Hongcow has decided to try to make new words from this one. He starts by taking the word he just learned how to spell, and moves the last character of the word to the beginning of the word. He calls this a cyclic shift. He can apply cyclic shift many times. For example, consecutively applying cyclic shift operation to the word "abracadabra" Hongcow will get words "aabracadabr", "raabracadab" and so on.

Hongcow is now wondering how many distinct words he can generate by doing the cyclic shift arbitrarily many times. The initial string is also counted.

Input

The first line of input will be a single string s (1 ≤ |s| ≤ 50), the word Hongcow initially learns how to spell. The string s consists only of lowercase English letters ('a'–'z').

Output

Output a single integer equal to the number of distinct strings that Hongcow can obtain by applying the cyclic shift arbitrarily many times to the given string.

Examples

Input

abcd


Output

4


Input

bbb


Output

1


Input

yzyz


Output

2

Note

For the first sample, the strings Hongcow can generate are "abcd", "dabc", "cdab", and "bcda".

For the second sample, no matter how many times Hongcow does the cyclic shift, Hongcow can only generate "bbb".

For the third sample, the two strings Hongcow can generate are "yzyz" and "zyzy".

Solution (in JAVA):

Solution:


import java.io.PrintWriter;

import java.util.*;
import java.util.Arrays ; 


public class Test{
    static int pos = 0 ; 
    static int  arr[] ; 
  static LinkedList l1 = new  LinkedList() ; 
static void find(int p ,char[]x,int put[],String s){
    int c= 0 ; 
    for (int i = 0; i < s.length(); i++) {
        if(x[p]==s.charAt(i)){
        c++ ; }
    }
    put[p] = c ;  
}
static int mode(int m ,int[]x ){
    int temp = 0 ; 
    for (int i = x.length-1; i >=0; i--) {
        if(x[i]<=m){
            temp= x[i] ; 
           /// break ; 
             return m-temp ; 
             
        }
    }
     return m-temp ; 
}
static int mode2(int m ,int[]x ){
    int temp = 0 ; 
    
    for (int i = x.length-1; i >=0; i--) {
        if(x[i]<=m){
            temp= x[i] ; 
           /// break ; 
             return x[i] ; 
             
        }
    }
     return 0 ; 
}
static int find(int x[],int temp){
    int j = 0 ; 
    for (int i = x.length-1; i >=0; i--) {
        if(x[i]==temp) return j+1 ; 
        j++ ; 
    }
    return -1 ; 
}
static String ch(long[]x,long b){
    for (int i = 0; i < x.length; i++) {
        if(x[i]==b)return "YES" ;
    }
    return "NO" ; 
}
static int pis(String s,char k ){
  
    for (int i = 0; i < s.length(); i++) {
        if(k==s.charAt(i) ) {
            return i ;
        } 
    }
   
    return -1 ; 
    
}
static  int fin(String s){
   int count = 0 ; 
    for (int i = 0; i < s.length(); i++) {
       if(s.charAt(i)>=65&&s.charAt(i)<=90) count++ ; 
    }
   return count ; 
}
static boolean config(int[]x ){
    for (int i = 0; i < x.length; i++) {
        if(x[i]==0) return false ;
    }
    return true  ; 
}
static long count(long i ){
    if(i%2==0){
        return i ; 
    }else return i+count(i-1) ;  
}
static boolean ce(int [][]x){
    for (int i = 0; i < x.length; i++) {
        if(x[i][0]!=x[i][1]) return true ; 
    }
    
    return false ;
}
static boolean c(int[][]x,int[]y){
    int j=y.length-1 ; 
    for (int i = 0; i < x.length; i++) {
        if(x[i][1]!=y[j]) return true;
        j-- ;
    }
    return false  ; 
}
static long gcd(long a , long b){
    if(b==0) return a ; 
    else return gcd(b,a%b) ; 
    
}
static boolean prime(int n,int y){
    int count =0 ; 
    for (int i = 2; i <= Math.max(n, y); i++) {
        if(n%i==0&&y%i==0)count++ ; 
    }
    if(count>0) return false ;
    
    return true ;
}
    public static void main(String[] args)  {

        Scanner in = new Scanner(System.in) ;
        PrintWriter pw = new PrintWriter(System.out);   
       String s= in.next() ; 
       String fin=s ; 
       int count =1 ; 
       int pos = s.length()-1 ; 
       while(true){
         String temp = Character.toString(s.charAt(pos)) ; 
        
           
         String cut = fin.substring(0,fin.length()-1);
    //     System.out.println(cut);
         fin = temp +cut ;
            if(fin.equals(s))break ; 
           pos-- ; 
           count++ ; 
           
       }
        
            
        
        System.out.println(count);
        
       
                 pw.close();
    }
}