import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			long n = scanner.nextLong();
			int sqrt = (int) Math.sqrt(n);
			for (int i = sqrt; i >= 1; i--) {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			}
		}
	}

	/**
	 * @param a
	 * @param b
	 * @return aとbの10進数の最大桁数
	 */
	private static int f(long a, long b) {
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			long n = scanner.nextLong();
			int sqrt = (int) Math.sqrt(n);
			for (int i = sqrt; i >= 1; i--) {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			}
		}
	}

	/**
	 * @param a
	 * @param b
	 * @return aとbの10進数の最大桁数
	 */
	private static int f(long a, long b) {
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	}
} Main public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			long n = scanner.nextLong();
			int sqrt = (int) Math.sqrt(n);
			for (int i = sqrt; i >= 1; i--) {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			}
		}
	} main {
		try (Scanner scanner = new Scanner(System.in)) {
			long n = scanner.nextLong();
			int sqrt = (int) Math.sqrt(n);
			for (int i = sqrt; i >= 1; i--) {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			}
		}
	} try (Scanner scanner = new Scanner(System.in)) {
			long n = scanner.nextLong();
			int sqrt = (int) Math.sqrt(n);
			for (int i = sqrt; i >= 1; i--) {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			}
		} {
			long n = scanner.nextLong();
			int sqrt = (int) Math.sqrt(n);
			for (int i = sqrt; i >= 1; i--) {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			}
		} Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) long n = scanner.nextLong(); n scanner.nextLong() scanner.nextLong scanner int sqrt = (int) Math.sqrt(n); sqrt (int) Math.sqrt(n) Math.sqrt Math n for (int i = sqrt; i >= 1; i--) {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			} int i = sqrt; int i = sqrt; i sqrt i >= 1 i 1 i-- i-- i {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			} {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			} if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				} (n % i) == 0 (n % i) n i 0 {
					System.out.println(f(i, n / i));
					return;
				} System.out.println(f(i, n / i)) System.out.println System.out System System.out f(i, n / i) f i n / i n i return; String[] args args /**
	 * @param a
	 * @param b
	 * @return aとbの10進数の最大桁数
	 */
	private static int f(long a, long b) {
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	} f {
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	} return Math.max(String.valueOf(a).length(), String.valueOf(b).length()); Math.max(String.valueOf(a).length(), String.valueOf(b).length()) Math.max Math String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a 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) {
		try (Scanner scanner = new Scanner(System.in)) {
			long n = scanner.nextLong();
			int sqrt = (int) Math.sqrt(n);
			for (int i = sqrt; i >= 1; i--) {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			}
		}
	}

	/**
	 * @param a
	 * @param b
	 * @return aとbの10進数の最大桁数
	 */
	private static int f(long a, long b) {
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	}
} public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			long n = scanner.nextLong();
			int sqrt = (int) Math.sqrt(n);
			for (int i = sqrt; i >= 1; i--) {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			}
		}
	}

	/**
	 * @param a
	 * @param b
	 * @return aとbの10進数の最大桁数
	 */
	private static int f(long a, long b) {
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			long n = scanner.nextLong();
			int sqrt = (int) Math.sqrt(n);
			for (int i = sqrt; i >= 1; i--) {
				if ((n % i) == 0) {
					System.out.println(f(i, n / i));
					return;
				}
			}
		}
	}

	/**
	 * @param a
	 * @param b
	 * @return aとbの10進数の最大桁数
	 */
	private static int f(long a, long b) {
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	}
}
