import java.util.Scanner;

public class Main {
	
	public static int getDigitsNum(long x){
		return String.valueOf(x).length();
	}

	public static void main(String[] args) {
		
		long N;

		Scanner scanner = new Scanner(System.in);
		N = scanner.nextLong();
		scanner.close();
		
		long maxDivisor = (long)Math.sqrt(N);
		long divisor = 2;
		int minNum = getDigitsNum(N);
		int num;
	
		while(divisor <= maxDivisor){
			if(N % divisor == 0){
				num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor));
				if(num < minNum){
					minNum = num;
				}
			}
			divisor++;
		}
		System.out.println(minNum);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	
	public static int getDigitsNum(long x){
		return String.valueOf(x).length();
	}

	public static void main(String[] args) {
		
		long N;

		Scanner scanner = new Scanner(System.in);
		N = scanner.nextLong();
		scanner.close();
		
		long maxDivisor = (long)Math.sqrt(N);
		long divisor = 2;
		int minNum = getDigitsNum(N);
		int num;
	
		while(divisor <= maxDivisor){
			if(N % divisor == 0){
				num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor));
				if(num < minNum){
					minNum = num;
				}
			}
			divisor++;
		}
		System.out.println(minNum);
	}

} Main public static int getDigitsNum(long x){
		return String.valueOf(x).length();
	} getDigitsNum {
		return String.valueOf(x).length();
	} return String.valueOf(x).length(); String.valueOf(x).length() String.valueOf(x).length String.valueOf(x) String.valueOf String x long x x public static void main(String[] args) {
		
		long N;

		Scanner scanner = new Scanner(System.in);
		N = scanner.nextLong();
		scanner.close();
		
		long maxDivisor = (long)Math.sqrt(N);
		long divisor = 2;
		int minNum = getDigitsNum(N);
		int num;
	
		while(divisor <= maxDivisor){
			if(N % divisor == 0){
				num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor));
				if(num < minNum){
					minNum = num;
				}
			}
			divisor++;
		}
		System.out.println(minNum);
	} main {
		
		long N;

		Scanner scanner = new Scanner(System.in);
		N = scanner.nextLong();
		scanner.close();
		
		long maxDivisor = (long)Math.sqrt(N);
		long divisor = 2;
		int minNum = getDigitsNum(N);
		int num;
	
		while(divisor <= maxDivisor){
			if(N % divisor == 0){
				num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor));
				if(num < minNum){
					minNum = num;
				}
			}
			divisor++;
		}
		System.out.println(minNum);
	} long N; N Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) N = scanner.nextLong() N scanner.nextLong() scanner.nextLong scanner scanner.close() scanner.close scanner long maxDivisor = (long)Math.sqrt(N); maxDivisor (long)Math.sqrt(N) Math.sqrt Math N long divisor = 2; divisor 2 int minNum = getDigitsNum(N); minNum getDigitsNum(N) getDigitsNum N int num; num while(divisor <= maxDivisor){
			if(N % divisor == 0){
				num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor));
				if(num < minNum){
					minNum = num;
				}
			}
			divisor++;
		} divisor <= maxDivisor divisor maxDivisor {
			if(N % divisor == 0){
				num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor));
				if(num < minNum){
					minNum = num;
				}
			}
			divisor++;
		} if(N % divisor == 0){
				num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor));
				if(num < minNum){
					minNum = num;
				}
			} N % divisor == 0 N % divisor N divisor 0 {
				num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor));
				if(num < minNum){
					minNum = num;
				}
			} num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor)) num Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor)) Math.max Math getDigitsNum(divisor) getDigitsNum divisor getDigitsNum(N / divisor) getDigitsNum N / divisor N divisor if(num < minNum){
					minNum = num;
				} num < minNum num minNum {
					minNum = num;
				} minNum = num minNum num divisor++ divisor System.out.println(minNum) System.out.println System.out System System.out minNum String[] args args public class Main {
	
	public static int getDigitsNum(long x){
		return String.valueOf(x).length();
	}

	public static void main(String[] args) {
		
		long N;

		Scanner scanner = new Scanner(System.in);
		N = scanner.nextLong();
		scanner.close();
		
		long maxDivisor = (long)Math.sqrt(N);
		long divisor = 2;
		int minNum = getDigitsNum(N);
		int num;
	
		while(divisor <= maxDivisor){
			if(N % divisor == 0){
				num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor));
				if(num < minNum){
					minNum = num;
				}
			}
			divisor++;
		}
		System.out.println(minNum);
	}

} public class Main {
	
	public static int getDigitsNum(long x){
		return String.valueOf(x).length();
	}

	public static void main(String[] args) {
		
		long N;

		Scanner scanner = new Scanner(System.in);
		N = scanner.nextLong();
		scanner.close();
		
		long maxDivisor = (long)Math.sqrt(N);
		long divisor = 2;
		int minNum = getDigitsNum(N);
		int num;
	
		while(divisor <= maxDivisor){
			if(N % divisor == 0){
				num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor));
				if(num < minNum){
					minNum = num;
				}
			}
			divisor++;
		}
		System.out.println(minNum);
	}

} Main
import java.util.Scanner;

public class Main {
	
	public static int getDigitsNum(long x){
		return String.valueOf(x).length();
	}

	public static void main(String[] args) {
		
		long N;

		Scanner scanner = new Scanner(System.in);
		N = scanner.nextLong();
		scanner.close();
		
		long maxDivisor = (long)Math.sqrt(N);
		long divisor = 2;
		int minNum = getDigitsNum(N);
		int num;
	
		while(divisor <= maxDivisor){
			if(N % divisor == 0){
				num = Math.max(getDigitsNum(divisor),getDigitsNum(N / divisor));
				if(num < minNum){
					minNum = num;
				}
			}
			divisor++;
		}
		System.out.println(minNum);
	}

}
