import java.util.*;
public class Main {

	public static int digits(long n) {
		int digit = 0;
		while(n > 0) {
			digit++;
			n /= 10;
		}
		return digit;
	}
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 10;
		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0)
				ans = Math.min(ans, Math.max(digits(N/i), digits(i)));
		}
		System.out.println(ans);
	}

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

	public static int digits(long n) {
		int digit = 0;
		while(n > 0) {
			digit++;
			n /= 10;
		}
		return digit;
	}
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 10;
		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0)
				ans = Math.min(ans, Math.max(digits(N/i), digits(i)));
		}
		System.out.println(ans);
	}

} Main public static int digits(long n) {
		int digit = 0;
		while(n > 0) {
			digit++;
			n /= 10;
		}
		return digit;
	} digits {
		int digit = 0;
		while(n > 0) {
			digit++;
			n /= 10;
		}
		return digit;
	} int digit = 0; digit 0 while(n > 0) {
			digit++;
			n /= 10;
		} n > 0 n 0 {
			digit++;
			n /= 10;
		} digit++ digit n /= 10 n 10 return digit; digit long n n public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 10;
		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0)
				ans = Math.min(ans, Math.max(digits(N/i), digits(i)));
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 10;
		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0)
				ans = Math.min(ans, Math.max(digits(N/i), digits(i)));
		}
		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 = 10; ans 10 for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0)
				ans = Math.min(ans, Math.max(digits(N/i), digits(i)));
		} int i = 1; int i = 1; i 1 i <= Math.sqrt(N) i Math.sqrt(N) Math.sqrt Math N i++ i++ i {
			if(N % i == 0)
				ans = Math.min(ans, Math.max(digits(N/i), digits(i)));
		} {
			if(N % i == 0)
				ans = Math.min(ans, Math.max(digits(N/i), digits(i)));
		} if(N % i == 0)
				ans = Math.min(ans, Math.max(digits(N/i), digits(i))); N % i == 0 N % i N i 0 ans = Math.min(ans, Math.max(digits(N/i), digits(i))) ans Math.min(ans, Math.max(digits(N/i), digits(i))) Math.min Math ans Math.max(digits(N/i), digits(i)) Math.max Math digits(N/i) digits N/i N i digits(i) digits i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static int digits(long n) {
		int digit = 0;
		while(n > 0) {
			digit++;
			n /= 10;
		}
		return digit;
	}
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 10;
		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0)
				ans = Math.min(ans, Math.max(digits(N/i), digits(i)));
		}
		System.out.println(ans);
	}

} public class Main {

	public static int digits(long n) {
		int digit = 0;
		while(n > 0) {
			digit++;
			n /= 10;
		}
		return digit;
	}
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 10;
		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0)
				ans = Math.min(ans, Math.max(digits(N/i), digits(i)));
		}
		System.out.println(ans);
	}

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

	public static int digits(long n) {
		int digit = 0;
		while(n > 0) {
			digit++;
			n /= 10;
		}
		return digit;
	}
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 10;
		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0)
				ans = Math.min(ans, Math.max(digits(N/i), digits(i)));
		}
		System.out.println(ans);
	}

}