import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();
		long res = Long.MAX_VALUE;
		for (long i = 1; i*i <= n; i++) {
			if (n % i == 0) {
				int tmpRes = 
						Math.max(
								String.valueOf(i).length(), 
								String.valueOf(n / i).length());
				res = Math.min(tmpRes, res);
			}
		}
		System.out.println(res);
	}
} import java.util.Scanner; Scanner java.util public class Main {

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

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

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();
		long res = Long.MAX_VALUE;
		for (long i = 1; i*i <= n; i++) {
			if (n % i == 0) {
				int tmpRes = 
						Math.max(
								String.valueOf(i).length(), 
								String.valueOf(n / i).length());
				res = Math.min(tmpRes, res);
			}
		}
		System.out.println(res);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();
		long res = Long.MAX_VALUE;
		for (long i = 1; i*i <= n; i++) {
			if (n % i == 0) {
				int tmpRes = 
						Math.max(
								String.valueOf(i).length(), 
								String.valueOf(n / i).length());
				res = Math.min(tmpRes, res);
			}
		}
		System.out.println(res);
	}
}