import java.util.Scanner;

public class Main {

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

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

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

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

public class Main {

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