import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		//素因数分
		long ans = Long.MAX_VALUE/2;
		for(int i = 1;(long)i*i<=n;i++) {
			if(n%i==0) {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			}
		}
		int res = 0;
		while(ans > 0) {
			ans /= 10;
			res ++;
		}
		System.out.println(res);
	}
}
 import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		//素因数分
		long ans = Long.MAX_VALUE/2;
		for(int i = 1;(long)i*i<=n;i++) {
			if(n%i==0) {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			}
		}
		int res = 0;
		while(ans > 0) {
			ans /= 10;
			res ++;
		}
		System.out.println(res);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		//素因数分
		long ans = Long.MAX_VALUE/2;
		for(int i = 1;(long)i*i<=n;i++) {
			if(n%i==0) {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			}
		}
		int res = 0;
		while(ans > 0) {
			ans /= 10;
			res ++;
		}
		System.out.println(res);
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		//素因数分
		long ans = Long.MAX_VALUE/2;
		for(int i = 1;(long)i*i<=n;i++) {
			if(n%i==0) {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			}
		}
		int res = 0;
		while(ans > 0) {
			ans /= 10;
			res ++;
		}
		System.out.println(res);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long ans = Long.MAX_VALUE/2; ans Long.MAX_VALUE/2 Long.MAX_VALUE Long Long.MAX_VALUE 2 for(int i = 1;(long)i*i<=n;i++) {
			if(n%i==0) {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			}
		} int i = 1; int i = 1; i 1 (long)i*i<=n (long)i*i (long)i i n i++ i++ i {
			if(n%i==0) {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			}
		} {
			if(n%i==0) {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			}
		} if(n%i==0) {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			} n%i==0 n%i n i 0 {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			} long a = i; a i long b = n/i; b n/i n i long tmp = Math.max(a,b); tmp Math.max(a,b) Math.max Math a b ans = Math.min(ans, tmp) ans Math.min(ans, tmp) Math.min Math ans tmp int res = 0; res 0 while(ans > 0) {
			ans /= 10;
			res ++;
		} ans > 0 ans 0 {
			ans /= 10;
			res ++;
		} ans /= 10 ans 10 res ++ res System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		//素因数分
		long ans = Long.MAX_VALUE/2;
		for(int i = 1;(long)i*i<=n;i++) {
			if(n%i==0) {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			}
		}
		int res = 0;
		while(ans > 0) {
			ans /= 10;
			res ++;
		}
		System.out.println(res);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		//素因数分
		long ans = Long.MAX_VALUE/2;
		for(int i = 1;(long)i*i<=n;i++) {
			if(n%i==0) {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			}
		}
		int res = 0;
		while(ans > 0) {
			ans /= 10;
			res ++;
		}
		System.out.println(res);
	}
} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		//素因数分
		long ans = Long.MAX_VALUE/2;
		for(int i = 1;(long)i*i<=n;i++) {
			if(n%i==0) {
				long a = i;
				long b = n/i;
				long tmp = Math.max(a,b);
				ans = Math.min(ans, tmp);
			}
		}
		int res = 0;
		while(ans > 0) {
			ans /= 10;
			res ++;
		}
		System.out.println(res);
	}
}

