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