import java.util.Scanner;

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

	static int func(long x) {
		int ret = 0;
		while(x >= 1) {
			x /= 10;
			ret++;
		}
		return ret;
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int ans = Integer.MAX_VALUE;
		for(long i = 1 ; i * i <= n ; i++) {
			if(n % i == 0) {
				int a = func(n/i);
				int b = func(i);
				int c = Math.max(a, b);
				ans = Math.min(ans, c);
			}
		}
		System.out.println(ans);
	}

	static int func(long x) {
		int ret = 0;
		while(x >= 1) {
			x /= 10;
			ret++;
		}
		return ret;
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int ans = Integer.MAX_VALUE;
		for(long i = 1 ; i * i <= n ; i++) {
			if(n % i == 0) {
				int a = func(n/i);
				int b = func(i);
				int c = Math.max(a, b);
				ans = Math.min(ans, c);
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int ans = Integer.MAX_VALUE;
		for(long i = 1 ; i * i <= n ; i++) {
			if(n % i == 0) {
				int a = func(n/i);
				int b = func(i);
				int c = Math.max(a, b);
				ans = Math.min(ans, c);
			}
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE for(long i = 1 ; i * i <= n ; i++) {
			if(n % i == 0) {
				int a = func(n/i);
				int b = func(i);
				int c = Math.max(a, b);
				ans = Math.min(ans, c);
			}
		} long i = 1 ; long i = 1 ; i 1 i * i <= n i * i i i n i++ i++ i {
			if(n % i == 0) {
				int a = func(n/i);
				int b = func(i);
				int c = Math.max(a, b);
				ans = Math.min(ans, c);
			}
		} {
			if(n % i == 0) {
				int a = func(n/i);
				int b = func(i);
				int c = Math.max(a, b);
				ans = Math.min(ans, c);
			}
		} if(n % i == 0) {
				int a = func(n/i);
				int b = func(i);
				int c = Math.max(a, b);
				ans = Math.min(ans, c);
			} n % i == 0 n % i n i 0 {
				int a = func(n/i);
				int b = func(i);
				int c = Math.max(a, b);
				ans = Math.min(ans, c);
			} int a = func(n/i); a func(n/i) func n/i n i int b = func(i); b func(i) func i int c = Math.max(a, b); c Math.max(a, b) Math.max Math a b ans = Math.min(ans, c) ans Math.min(ans, c) Math.min Math ans c System.out.println(ans) System.out.println System.out System System.out ans String[] args args static int func(long x) {
		int ret = 0;
		while(x >= 1) {
			x /= 10;
			ret++;
		}
		return ret;
	} func {
		int ret = 0;
		while(x >= 1) {
			x /= 10;
			ret++;
		}
		return ret;
	} int ret = 0; ret 0 while(x >= 1) {
			x /= 10;
			ret++;
		} x >= 1 x 1 {
			x /= 10;
			ret++;
		} x /= 10 x 10 ret++ ret return ret; ret long x x public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int ans = Integer.MAX_VALUE;
		for(long i = 1 ; i * i <= n ; i++) {
			if(n % i == 0) {
				int a = func(n/i);
				int b = func(i);
				int c = Math.max(a, b);
				ans = Math.min(ans, c);
			}
		}
		System.out.println(ans);
	}

	static int func(long x) {
		int ret = 0;
		while(x >= 1) {
			x /= 10;
			ret++;
		}
		return ret;
	}

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

	static int func(long x) {
		int ret = 0;
		while(x >= 1) {
			x /= 10;
			ret++;
		}
		return ret;
	}

} Main
import java.util.Scanner;

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

	static int func(long x) {
		int ret = 0;
		while(x >= 1) {
			x /= 10;
			ret++;
		}
		return ret;
	}

}
