import java.util.Scanner;
 
public class Main {
	static Scanner in = new Scanner(System.in);
	public static void main(String[] args){
		long N = in.nextLong();
		
		int min	 = Integer.MAX_VALUE;
		for(int i = 1; i <= (int)Math.sqrt(N); i++){
			if(N % i == 0){
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			}
		}
		System.out.println(min);
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	static Scanner in = new Scanner(System.in);
	public static void main(String[] args){
		long N = in.nextLong();
		
		int min	 = Integer.MAX_VALUE;
		for(int i = 1; i <= (int)Math.sqrt(N); i++){
			if(N % i == 0){
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			}
		}
		System.out.println(min);
		
	}
} Main static Scanner in = new Scanner(System.in); in new Scanner(System.in) public static void main(String[] args){
		long N = in.nextLong();
		
		int min	 = Integer.MAX_VALUE;
		for(int i = 1; i <= (int)Math.sqrt(N); i++){
			if(N % i == 0){
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			}
		}
		System.out.println(min);
		
	} main {
		long N = in.nextLong();
		
		int min	 = Integer.MAX_VALUE;
		for(int i = 1; i <= (int)Math.sqrt(N); i++){
			if(N % i == 0){
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			}
		}
		System.out.println(min);
		
	} long N = in.nextLong(); N in.nextLong() in.nextLong in int min	 = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i = 1; i <= (int)Math.sqrt(N); i++){
			if(N % i == 0){
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			}
		} int i = 1; int i = 1; i 1 i <= (int)Math.sqrt(N) i (int)Math.sqrt(N) Math.sqrt Math N i++ i++ i {
			if(N % i == 0){
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			}
		} {
			if(N % i == 0){
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			}
		} if(N % i == 0){
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			} N % i == 0 N % i N i 0 {
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			} int j = (int)(N / i); j (int)(N / i) N i min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length())) min Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length())) Math.min Math min Math.max(String.valueOf(j).length(), String.valueOf(i).length()) Math.max Math String.valueOf(j).length() String.valueOf(j).length String.valueOf(j) String.valueOf String j String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
	static Scanner in = new Scanner(System.in);
	public static void main(String[] args){
		long N = in.nextLong();
		
		int min	 = Integer.MAX_VALUE;
		for(int i = 1; i <= (int)Math.sqrt(N); i++){
			if(N % i == 0){
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			}
		}
		System.out.println(min);
		
	}
} public class Main {
	static Scanner in = new Scanner(System.in);
	public static void main(String[] args){
		long N = in.nextLong();
		
		int min	 = Integer.MAX_VALUE;
		for(int i = 1; i <= (int)Math.sqrt(N); i++){
			if(N % i == 0){
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			}
		}
		System.out.println(min);
		
	}
} Main
import java.util.Scanner;
 
public class Main {
	static Scanner in = new Scanner(System.in);
	public static void main(String[] args){
		long N = in.nextLong();
		
		int min	 = Integer.MAX_VALUE;
		for(int i = 1; i <= (int)Math.sqrt(N); i++){
			if(N % i == 0){
				int j = (int)(N / i);
				min = Math.min(min, Math.max(String.valueOf(j).length(), String.valueOf(i).length()));
			}
		}
		System.out.println(min);
		
	}
}