import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
	    long nlen = String.valueOf(n).length(); 
	    for (long i = 1; i * i <= n; i++) {    
	        if (n % i == 0) {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        }
	    }
	    System.out.println(nlen);
	    
	    
	}

} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
	    long nlen = String.valueOf(n).length(); 
	    for (long i = 1; i * i <= n; i++) {    
	        if (n % i == 0) {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        }
	    }
	    System.out.println(nlen);
	    
	    
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
	    long nlen = String.valueOf(n).length(); 
	    for (long i = 1; i * i <= n; i++) {    
	        if (n % i == 0) {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        }
	    }
	    System.out.println(nlen);
	    
	    
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
	    long nlen = String.valueOf(n).length(); 
	    for (long i = 1; i * i <= n; i++) {    
	        if (n % i == 0) {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        }
	    }
	    System.out.println(nlen);
	    
	    
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long nlen = String.valueOf(n).length(); nlen String.valueOf(n).length() String.valueOf(n).length String.valueOf(n) String.valueOf String n for (long i = 1; i * i <= n; i++) {    
	        if (n % i == 0) {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        }
	    } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {    
	        if (n % i == 0) {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        }
	    } {    
	        if (n % i == 0) {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        }
	    } if (n % i == 0) {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        } n % i == 0 n % i n i 0 {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        } if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            } String.valueOf(n/i).length() < nlen String.valueOf(n/i).length() String.valueOf(n/i).length String.valueOf(n/i) String.valueOf String n/i n i nlen {
                	nlen = String.valueOf(n/i).length();
	            } nlen = String.valueOf(n/i).length() nlen String.valueOf(n/i).length() String.valueOf(n/i).length String.valueOf(n/i) String.valueOf String n/i n i System.out.println(nlen) System.out.println System.out System System.out nlen String[] args args public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
	    long nlen = String.valueOf(n).length(); 
	    for (long i = 1; i * i <= n; i++) {    
	        if (n % i == 0) {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        }
	    }
	    System.out.println(nlen);
	    
	    
	}

} public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
	    long nlen = String.valueOf(n).length(); 
	    for (long i = 1; i * i <= n; i++) {    
	        if (n % i == 0) {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        }
	    }
	    System.out.println(nlen);
	    
	    
	}

} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
	    long nlen = String.valueOf(n).length(); 
	    for (long i = 1; i * i <= n; i++) {    
	        if (n % i == 0) {      
                if (String.valueOf(n/i).length() < nlen ){
                	nlen = String.valueOf(n/i).length();
	            }
	        }
	    }
	    System.out.println(nlen);
	    
	    
	}

}