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