import java.util.*;

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

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