import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long min = (long)Math.pow(10,11);
		
		for(long i = 1; i * i<= N; i++) {
			if(N % i == 0) {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			}
		}
		
		System.out.println(min);
		
		scan.close();

	}
	
	public static int getMax(long A, long B) {
		if(Long.toString(A).length() > Long.toString(B).length()) {
			return Long.toString(A).length();
		} else {
			return Long.toString(B).length();
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long min = (long)Math.pow(10,11);
		
		for(long i = 1; i * i<= N; i++) {
			if(N % i == 0) {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			}
		}
		
		System.out.println(min);
		
		scan.close();

	}
	
	public static int getMax(long A, long B) {
		if(Long.toString(A).length() > Long.toString(B).length()) {
			return Long.toString(A).length();
		} else {
			return Long.toString(B).length();
		}
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long min = (long)Math.pow(10,11);
		
		for(long i = 1; i * i<= N; i++) {
			if(N % i == 0) {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			}
		}
		
		System.out.println(min);
		
		scan.close();

	} main {
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long min = (long)Math.pow(10,11);
		
		for(long i = 1; i * i<= N; i++) {
			if(N % i == 0) {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			}
		}
		
		System.out.println(min);
		
		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long N = scan.nextLong(); N scan.nextLong() scan.nextLong scan long min = (long)Math.pow(10,11); min (long)Math.pow(10,11) Math.pow Math 10 11 for(long i = 1; i * i<= N; i++) {
			if(N % i == 0) {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			}
		} long i = 1; long i = 1; i 1 i * i<= N i * i i i N i++ i++ i {
			if(N % i == 0) {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			}
		} {
			if(N % i == 0) {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			}
		} if(N % i == 0) {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			} N % i == 0 N % i N i 0 {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			} if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				} getMax(i, N / i) < min getMax(i, N / i) getMax i N / i N i min {
					min = getMax(i, N / i);
				} min = getMax(i, N / i) min getMax(i, N / i) getMax i N / i N i System.out.println(min) System.out.println System.out System System.out min scan.close() scan.close scan String[] args args public static int getMax(long A, long B) {
		if(Long.toString(A).length() > Long.toString(B).length()) {
			return Long.toString(A).length();
		} else {
			return Long.toString(B).length();
		}
	} getMax {
		if(Long.toString(A).length() > Long.toString(B).length()) {
			return Long.toString(A).length();
		} else {
			return Long.toString(B).length();
		}
	} if(Long.toString(A).length() > Long.toString(B).length()) {
			return Long.toString(A).length();
		} else {
			return Long.toString(B).length();
		} Long.toString(A).length() > Long.toString(B).length() Long.toString(A).length() Long.toString(A).length Long.toString(A) Long.toString Long A Long.toString(B).length() Long.toString(B).length Long.toString(B) Long.toString Long B {
			return Long.toString(A).length();
		} return Long.toString(A).length(); Long.toString(A).length() Long.toString(A).length Long.toString(A) Long.toString Long A {
			return Long.toString(B).length();
		} return Long.toString(B).length(); Long.toString(B).length() Long.toString(B).length Long.toString(B) Long.toString Long B long A A long B B public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long min = (long)Math.pow(10,11);
		
		for(long i = 1; i * i<= N; i++) {
			if(N % i == 0) {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			}
		}
		
		System.out.println(min);
		
		scan.close();

	}
	
	public static int getMax(long A, long B) {
		if(Long.toString(A).length() > Long.toString(B).length()) {
			return Long.toString(A).length();
		} else {
			return Long.toString(B).length();
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long min = (long)Math.pow(10,11);
		
		for(long i = 1; i * i<= N; i++) {
			if(N % i == 0) {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			}
		}
		
		System.out.println(min);
		
		scan.close();

	}
	
	public static int getMax(long A, long B) {
		if(Long.toString(A).length() > Long.toString(B).length()) {
			return Long.toString(A).length();
		} else {
			return Long.toString(B).length();
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long min = (long)Math.pow(10,11);
		
		for(long i = 1; i * i<= N; i++) {
			if(N % i == 0) {
				if(getMax(i, N / i) < min) {
					min = getMax(i, N / i);
				}
			}
		}
		
		System.out.println(min);
		
		scan.close();

	}
	
	public static int getMax(long A, long B) {
		if(Long.toString(A).length() > Long.toString(B).length()) {
			return Long.toString(A).length();
		} else {
			return Long.toString(B).length();
		}
	}

}
