
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner io = new Scanner(System.in);
		long N = io.nextLong();
		
		long ans = Long.MAX_VALUE;
		for(long i=1;i*i<=N;i++){
			if(N%i==0){
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						);
			}
		}
		
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner io = new Scanner(System.in);
		long N = io.nextLong();
		
		long ans = Long.MAX_VALUE;
		for(long i=1;i*i<=N;i++){
			if(N%i==0){
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						);
			}
		}
		
		System.out.println(ans);
	}
} Main public static void main(String[] args){
		Scanner io = new Scanner(System.in);
		long N = io.nextLong();
		
		long ans = Long.MAX_VALUE;
		for(long i=1;i*i<=N;i++){
			if(N%i==0){
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						);
			}
		}
		
		System.out.println(ans);
	} main {
		Scanner io = new Scanner(System.in);
		long N = io.nextLong();
		
		long ans = Long.MAX_VALUE;
		for(long i=1;i*i<=N;i++){
			if(N%i==0){
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						);
			}
		}
		
		System.out.println(ans);
	} Scanner io = new Scanner(System.in); io new Scanner(System.in) long N = io.nextLong(); N io.nextLong() io.nextLong io long ans = Long.MAX_VALUE; ans Long.MAX_VALUE Long Long.MAX_VALUE for(long i=1;i*i<=N;i++){
			if(N%i==0){
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								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){
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						);
			}
		} {
			if(N%i==0){
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						);
			}
		} if(N%i==0){
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						);
			} N%i==0 N%i N i 0 {
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						);
			} ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						) ans Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						) Math.min Math ans Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length()) Math.max Math String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i String.valueOf(N/i).length() String.valueOf(N/i).length String.valueOf(N/i) String.valueOf String N/i N i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args){
		Scanner io = new Scanner(System.in);
		long N = io.nextLong();
		
		long ans = Long.MAX_VALUE;
		for(long i=1;i*i<=N;i++){
			if(N%i==0){
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						);
			}
		}
		
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args){
		Scanner io = new Scanner(System.in);
		long N = io.nextLong();
		
		long ans = Long.MAX_VALUE;
		for(long i=1;i*i<=N;i++){
			if(N%i==0){
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						);
			}
		}
		
		System.out.println(ans);
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner io = new Scanner(System.in);
		long N = io.nextLong();
		
		long ans = Long.MAX_VALUE;
		for(long i=1;i*i<=N;i++){
			if(N%i==0){
				ans = Math.min(ans,
						Math.max(String.valueOf(i).length(),
								String.valueOf(N/i).length())
						);
			}
		}
		
		System.out.println(ans);
	}
}
