import java.util.*;

public class Main{
    
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        long N = sc.nextLong();
        sc.close();
       
        long max = N;
        for(long i = 2; (i*i) <= N; i++){
            if(N%i == 0){
                max = N/i;
            }
        }
        int count = 1;
        while(max/10 != 0){
            count++;
            max /= 10;
        }
        System.out.println(count);
   }
} import java.util.*; util.* java public class Main{
    
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        long N = sc.nextLong();
        sc.close();
       
        long max = N;
        for(long i = 2; (i*i) <= N; i++){
            if(N%i == 0){
                max = N/i;
            }
        }
        int count = 1;
        while(max/10 != 0){
            count++;
            max /= 10;
        }
        System.out.println(count);
   }
} Main public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        long N = sc.nextLong();
        sc.close();
       
        long max = N;
        for(long i = 2; (i*i) <= N; i++){
            if(N%i == 0){
                max = N/i;
            }
        }
        int count = 1;
        while(max/10 != 0){
            count++;
            max /= 10;
        }
        System.out.println(count);
   } main {
        Scanner sc = new Scanner(System.in);
        
        long N = sc.nextLong();
        sc.close();
       
        long max = N;
        for(long i = 2; (i*i) <= N; i++){
            if(N%i == 0){
                max = N/i;
            }
        }
        int count = 1;
        while(max/10 != 0){
            count++;
            max /= 10;
        }
        System.out.println(count);
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc sc.close() sc.close sc long max = N; max N for(long i = 2; (i*i) <= N; i++){
            if(N%i == 0){
                max = N/i;
            }
        } long i = 2; long i = 2; i 2 (i*i) <= N (i*i) i i N i++ i++ i {
            if(N%i == 0){
                max = N/i;
            }
        } {
            if(N%i == 0){
                max = N/i;
            }
        } if(N%i == 0){
                max = N/i;
            } N%i == 0 N%i N i 0 {
                max = N/i;
            } max = N/i max N/i N i int count = 1; count 1 while(max/10 != 0){
            count++;
            max /= 10;
        } max/10 != 0 max/10 max 10 0 {
            count++;
            max /= 10;
        } count++ count max /= 10 max 10 System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main{
    
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        long N = sc.nextLong();
        sc.close();
       
        long max = N;
        for(long i = 2; (i*i) <= N; i++){
            if(N%i == 0){
                max = N/i;
            }
        }
        int count = 1;
        while(max/10 != 0){
            count++;
            max /= 10;
        }
        System.out.println(count);
   }
} public class Main{
    
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        long N = sc.nextLong();
        sc.close();
       
        long max = N;
        for(long i = 2; (i*i) <= N; i++){
            if(N%i == 0){
                max = N/i;
            }
        }
        int count = 1;
        while(max/10 != 0){
            count++;
            max /= 10;
        }
        System.out.println(count);
   }
} Main
import java.util.*;

public class Main{
    
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        long N = sc.nextLong();
        sc.close();
       
        long max = N;
        for(long i = 2; (i*i) <= N; i++){
            if(N%i == 0){
                max = N/i;
            }
        }
        int count = 1;
        while(max/10 != 0){
            count++;
            max /= 10;
        }
        System.out.println(count);
   }
}