import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int min = Integer.MAX_VALUE;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				long x = n / i;
				int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length());
				if (min > f) {
					min = f;
				}
			}
		}
		System.out.println(min);
	}
} import java.util.*; util.* java public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int min = Integer.MAX_VALUE;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				long x = n / i;
				int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length());
				if (min > f) {
					min = f;
				}
			}
		}
		System.out.println(min);
	}
} Main public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int min = Integer.MAX_VALUE;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				long x = n / i;
				int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length());
				if (min > f) {
					min = f;
				}
			}
		}
		System.out.println(min);
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int min = Integer.MAX_VALUE;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				long x = n / i;
				int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length());
				if (min > f) {
					min = f;
				}
			}
		}
		System.out.println(min);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				long x = n / i;
				int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length());
				if (min > f) {
					min = f;
				}
			}
		} long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
			if (n % i == 0) {
				long x = n / i;
				int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length());
				if (min > f) {
					min = f;
				}
			}
		} {
			if (n % i == 0) {
				long x = n / i;
				int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length());
				if (min > f) {
					min = f;
				}
			}
		} if (n % i == 0) {
				long x = n / i;
				int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length());
				if (min > f) {
					min = f;
				}
			} n % i == 0 n % i n i 0 {
				long x = n / i;
				int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length());
				if (min > f) {
					min = f;
				}
			} long x = n / i; x n / i n i int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length()); f Math.max(String.valueOf(i).length(), String.valueOf(x).length()) Math.max Math String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i String.valueOf(x).length() String.valueOf(x).length String.valueOf(x) String.valueOf String x if (min > f) {
					min = f;
				} min > f min f {
					min = f;
				} min = f min f 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 n = sc.nextLong();
		int min = Integer.MAX_VALUE;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				long x = n / i;
				int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length());
				if (min > f) {
					min = f;
				}
			}
		}
		System.out.println(min);
	}
} public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int min = Integer.MAX_VALUE;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				long x = n / i;
				int f = Math.max(String.valueOf(i).length(), String.valueOf(x).length());
				if (min > f) {
					min = f;
				}
			}
		}
		System.out.println(min);
	}
} Main
import java.util.*;

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