import java.util.Scanner;

public class Main {

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

		int minDigit = 11;
		for (long a = 1; a * a <= n; a++) {
			if (n % a == 0) {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			}
		}

		System.out.println(minDigit);

		sc.close();
	}

	static int func(String a, String b) {
		return Math.max(a.length(), 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 minDigit = 11;
		for (long a = 1; a * a <= n; a++) {
			if (n % a == 0) {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			}
		}

		System.out.println(minDigit);

		sc.close();
	}

	static int func(String a, String b) {
		return Math.max(a.length(), b.length());
	}

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

		int minDigit = 11;
		for (long a = 1; a * a <= n; a++) {
			if (n % a == 0) {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			}
		}

		System.out.println(minDigit);

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

		int minDigit = 11;
		for (long a = 1; a * a <= n; a++) {
			if (n % a == 0) {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			}
		}

		System.out.println(minDigit);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int minDigit = 11; minDigit 11 for (long a = 1; a * a <= n; a++) {
			if (n % a == 0) {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			}
		} long a = 1; long a = 1; a 1 a * a <= n a * a a a n a++ a++ a {
			if (n % a == 0) {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			}
		} {
			if (n % a == 0) {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			}
		} if (n % a == 0) {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			} n % a == 0 n % a n a 0 {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			} long b = n / a; b n / a n a int digit = func("" + a, "" + b); digit func("" + a, "" + b) func "" + a "" a "" + b "" b if (digit < minDigit) {
					minDigit = digit;
				} digit < minDigit digit minDigit {
					minDigit = digit;
				} minDigit = digit minDigit digit System.out.println(minDigit) System.out.println System.out System System.out minDigit sc.close() sc.close sc String[] args args static int func(String a, String b) {
		return Math.max(a.length(), b.length());
	} func {
		return Math.max(a.length(), b.length());
	} return Math.max(a.length(), b.length()); Math.max(a.length(), b.length()) Math.max Math a.length() a.length a b.length() b.length b String a a String b b public class Main {

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

		int minDigit = 11;
		for (long a = 1; a * a <= n; a++) {
			if (n % a == 0) {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			}
		}

		System.out.println(minDigit);

		sc.close();
	}

	static int func(String a, String b) {
		return Math.max(a.length(), b.length());
	}

} public class Main {

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

		int minDigit = 11;
		for (long a = 1; a * a <= n; a++) {
			if (n % a == 0) {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			}
		}

		System.out.println(minDigit);

		sc.close();
	}

	static int func(String a, String b) {
		return Math.max(a.length(), 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 minDigit = 11;
		for (long a = 1; a * a <= n; a++) {
			if (n % a == 0) {
				long b = n / a;
				int digit = func("" + a, "" + b);
				if (digit < minDigit) {
					minDigit = digit;
				}
			}
		}

		System.out.println(minDigit);

		sc.close();
	}

	static int func(String a, String b) {
		return Math.max(a.length(), b.length());
	}

}
