import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		long sq = (long) Math.sqrt(N);
		if (N % sq == 0) {
			System.out.println(String.valueOf(sq).length());
		} else {
			long a = N;
			long b = 1;
			while (b < sq) {
				b++;
				if (N % b == 0) {
					a = N / b;
				}
			}
			b = N / a;
			long aLength = String.valueOf(a).length();
			long bLength = String.valueOf(b).length();
			System.out.println(Math.max(aLength, bLength));
		}

	}

} 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();

		long sq = (long) Math.sqrt(N);
		if (N % sq == 0) {
			System.out.println(String.valueOf(sq).length());
		} else {
			long a = N;
			long b = 1;
			while (b < sq) {
				b++;
				if (N % b == 0) {
					a = N / b;
				}
			}
			b = N / a;
			long aLength = String.valueOf(a).length();
			long bLength = String.valueOf(b).length();
			System.out.println(Math.max(aLength, bLength));
		}

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		long sq = (long) Math.sqrt(N);
		if (N % sq == 0) {
			System.out.println(String.valueOf(sq).length());
		} else {
			long a = N;
			long b = 1;
			while (b < sq) {
				b++;
				if (N % b == 0) {
					a = N / b;
				}
			}
			b = N / a;
			long aLength = String.valueOf(a).length();
			long bLength = String.valueOf(b).length();
			System.out.println(Math.max(aLength, bLength));
		}

	} main {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		long sq = (long) Math.sqrt(N);
		if (N % sq == 0) {
			System.out.println(String.valueOf(sq).length());
		} else {
			long a = N;
			long b = 1;
			while (b < sq) {
				b++;
				if (N % b == 0) {
					a = N / b;
				}
			}
			b = N / a;
			long aLength = String.valueOf(a).length();
			long bLength = String.valueOf(b).length();
			System.out.println(Math.max(aLength, bLength));
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long sq = (long) Math.sqrt(N); sq (long) Math.sqrt(N) Math.sqrt Math N if (N % sq == 0) {
			System.out.println(String.valueOf(sq).length());
		} else {
			long a = N;
			long b = 1;
			while (b < sq) {
				b++;
				if (N % b == 0) {
					a = N / b;
				}
			}
			b = N / a;
			long aLength = String.valueOf(a).length();
			long bLength = String.valueOf(b).length();
			System.out.println(Math.max(aLength, bLength));
		} N % sq == 0 N % sq N sq 0 {
			System.out.println(String.valueOf(sq).length());
		} System.out.println(String.valueOf(sq).length()) System.out.println System.out System System.out String.valueOf(sq).length() String.valueOf(sq).length String.valueOf(sq) String.valueOf String sq {
			long a = N;
			long b = 1;
			while (b < sq) {
				b++;
				if (N % b == 0) {
					a = N / b;
				}
			}
			b = N / a;
			long aLength = String.valueOf(a).length();
			long bLength = String.valueOf(b).length();
			System.out.println(Math.max(aLength, bLength));
		} long a = N; a N long b = 1; b 1 while (b < sq) {
				b++;
				if (N % b == 0) {
					a = N / b;
				}
			} b < sq b sq {
				b++;
				if (N % b == 0) {
					a = N / b;
				}
			} b++ b if (N % b == 0) {
					a = N / b;
				} N % b == 0 N % b N b 0 {
					a = N / b;
				} a = N / b a N / b N b b = N / a b N / a N a long aLength = String.valueOf(a).length(); aLength String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a long bLength = String.valueOf(b).length(); bLength String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b System.out.println(Math.max(aLength, bLength)) System.out.println System.out System System.out Math.max(aLength, bLength) Math.max Math aLength bLength String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		long sq = (long) Math.sqrt(N);
		if (N % sq == 0) {
			System.out.println(String.valueOf(sq).length());
		} else {
			long a = N;
			long b = 1;
			while (b < sq) {
				b++;
				if (N % b == 0) {
					a = N / b;
				}
			}
			b = N / a;
			long aLength = String.valueOf(a).length();
			long bLength = String.valueOf(b).length();
			System.out.println(Math.max(aLength, bLength));
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		long sq = (long) Math.sqrt(N);
		if (N % sq == 0) {
			System.out.println(String.valueOf(sq).length());
		} else {
			long a = N;
			long b = 1;
			while (b < sq) {
				b++;
				if (N % b == 0) {
					a = N / b;
				}
			}
			b = N / a;
			long aLength = String.valueOf(a).length();
			long bLength = String.valueOf(b).length();
			System.out.println(Math.max(aLength, bLength));
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		long sq = (long) Math.sqrt(N);
		if (N % sq == 0) {
			System.out.println(String.valueOf(sq).length());
		} else {
			long a = N;
			long b = 1;
			while (b < sq) {
				b++;
				if (N % b == 0) {
					a = N / b;
				}
			}
			b = N / a;
			long aLength = String.valueOf(a).length();
			long bLength = String.valueOf(b).length();
			System.out.println(Math.max(aLength, bLength));
		}

	}

}