import java.util.Scanner;

public class Main {
	public static void main(String[] args)  {
		Scanner sc = new Scanner((System.in));
		long n = sc.nextLong();
		int min = String.valueOf(n).length();;
		int tmp = 0;
		for(long i = 1; i * i <= n; i++) {
			if(n%i == 0) {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			}
		}
		System.out.println(min);
	}

	public static int F(long a, long b) {
		if(a > b) {
			return String.valueOf(a).length();
		}else {
			return String.valueOf(b).length();
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args)  {
		Scanner sc = new Scanner((System.in));
		long n = sc.nextLong();
		int min = String.valueOf(n).length();;
		int tmp = 0;
		for(long i = 1; i * i <= n; i++) {
			if(n%i == 0) {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			}
		}
		System.out.println(min);
	}

	public static int F(long a, long b) {
		if(a > b) {
			return String.valueOf(a).length();
		}else {
			return String.valueOf(b).length();
		}
	}
} Main public static void main(String[] args)  {
		Scanner sc = new Scanner((System.in));
		long n = sc.nextLong();
		int min = String.valueOf(n).length();;
		int tmp = 0;
		for(long i = 1; i * i <= n; i++) {
			if(n%i == 0) {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			}
		}
		System.out.println(min);
	} main {
		Scanner sc = new Scanner((System.in));
		long n = sc.nextLong();
		int min = String.valueOf(n).length();;
		int tmp = 0;
		for(long i = 1; i * i <= n; i++) {
			if(n%i == 0) {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			}
		}
		System.out.println(min);
	} Scanner sc = new Scanner((System.in)); sc new Scanner((System.in)) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int min = String.valueOf(n).length(); min String.valueOf(n).length() String.valueOf(n).length String.valueOf(n) String.valueOf String n int tmp = 0; tmp 0 for(long i = 1; i * i <= n; i++) {
			if(n%i == 0) {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			}
		} long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
			if(n%i == 0) {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			}
		} {
			if(n%i == 0) {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			}
		} if(n%i == 0) {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			} n%i == 0 n%i n i 0 {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			} tmp = F(i, n/i) tmp F(i, n/i) F i n/i n i if(min > tmp) {
					min = tmp;
				} min > tmp min tmp {
					min = tmp;
				} min = tmp min tmp System.out.println(min) System.out.println System.out System System.out min String[] args args public static int F(long a, long b) {
		if(a > b) {
			return String.valueOf(a).length();
		}else {
			return String.valueOf(b).length();
		}
	} F {
		if(a > b) {
			return String.valueOf(a).length();
		}else {
			return String.valueOf(b).length();
		}
	} if(a > b) {
			return String.valueOf(a).length();
		}else {
			return String.valueOf(b).length();
		} a > b a b {
			return String.valueOf(a).length();
		} return String.valueOf(a).length(); String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a {
			return String.valueOf(b).length();
		} return String.valueOf(b).length(); String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b long a a long b b public class Main {
	public static void main(String[] args)  {
		Scanner sc = new Scanner((System.in));
		long n = sc.nextLong();
		int min = String.valueOf(n).length();;
		int tmp = 0;
		for(long i = 1; i * i <= n; i++) {
			if(n%i == 0) {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			}
		}
		System.out.println(min);
	}

	public static int F(long a, long b) {
		if(a > b) {
			return String.valueOf(a).length();
		}else {
			return String.valueOf(b).length();
		}
	}
} public class Main {
	public static void main(String[] args)  {
		Scanner sc = new Scanner((System.in));
		long n = sc.nextLong();
		int min = String.valueOf(n).length();;
		int tmp = 0;
		for(long i = 1; i * i <= n; i++) {
			if(n%i == 0) {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			}
		}
		System.out.println(min);
	}

	public static int F(long a, long b) {
		if(a > b) {
			return String.valueOf(a).length();
		}else {
			return String.valueOf(b).length();
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args)  {
		Scanner sc = new Scanner((System.in));
		long n = sc.nextLong();
		int min = String.valueOf(n).length();;
		int tmp = 0;
		for(long i = 1; i * i <= n; i++) {
			if(n%i == 0) {
				tmp = F(i, n/i);
				if(min > tmp) {
					min = tmp;
				}
			}
		}
		System.out.println(min);
	}

	public static int F(long a, long b) {
		if(a > b) {
			return String.valueOf(a).length();
		}else {
			return String.valueOf(b).length();
		}
	}
}