import java.util.Scanner;

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

		int s = (int) Math.ceil(Math.sqrt(n));
		for (long i = s; i > 0; i--) {
			if (n % i == 0) {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		int s = (int) Math.ceil(Math.sqrt(n));
		for (long i = s; i > 0; i--) {
			if (n % i == 0) {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			}
		}
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		int s = (int) Math.ceil(Math.sqrt(n));
		for (long i = s; i > 0; i--) {
			if (n % i == 0) {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		int s = (int) Math.ceil(Math.sqrt(n));
		for (long i = s; i > 0; i--) {
			if (n % i == 0) {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc sc.close() sc.close sc int s = (int) Math.ceil(Math.sqrt(n)); s (int) Math.ceil(Math.sqrt(n)) Math.ceil Math Math.sqrt(n) Math.sqrt Math n for (long i = s; i > 0; i--) {
			if (n % i == 0) {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			}
		} long i = s; long i = s; i s i > 0 i 0 i-- i-- i {
			if (n % i == 0) {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			}
		} {
			if (n % i == 0) {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			}
		} if (n % i == 0) {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			} n % i == 0 n % i n i 0 {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			} long l = n / i; l n / i n i System.out.println(String.valueOf(l).length()) System.out.println System.out System System.out String.valueOf(l).length() String.valueOf(l).length String.valueOf(l) String.valueOf String l return; String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		int s = (int) Math.ceil(Math.sqrt(n));
		for (long i = s; i > 0; i--) {
			if (n % i == 0) {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			}
		}
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		int s = (int) Math.ceil(Math.sqrt(n));
		for (long i = s; i > 0; i--) {
			if (n % i == 0) {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			}
		}
	}
} Main
import java.util.Scanner;

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

		int s = (int) Math.ceil(Math.sqrt(n));
		for (long i = s; i > 0; i--) {
			if (n % i == 0) {
				long l = n / i;
				System.out.println(String.valueOf(l).length());
				return;
			}
		}
	}
}
