import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long N = scn.nextLong();
		int ans = 0;
		long A = 1;
		for(long i = (long)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				A = N/i;
				break;
			}
		}

		while(A >0) {
			ans++;
			A/=10;
		}
		System.out.println(ans);
	}

} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long N = scn.nextLong();
		int ans = 0;
		long A = 1;
		for(long i = (long)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				A = N/i;
				break;
			}
		}

		while(A >0) {
			ans++;
			A/=10;
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long N = scn.nextLong();
		int ans = 0;
		long A = 1;
		for(long i = (long)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				A = N/i;
				break;
			}
		}

		while(A >0) {
			ans++;
			A/=10;
		}
		System.out.println(ans);
	} main {
		Scanner scn = new Scanner(System.in);
		long N = scn.nextLong();
		int ans = 0;
		long A = 1;
		for(long i = (long)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				A = N/i;
				break;
			}
		}

		while(A >0) {
			ans++;
			A/=10;
		}
		System.out.println(ans);
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) long N = scn.nextLong(); N scn.nextLong() scn.nextLong scn int ans = 0; ans 0 long A = 1; A 1 for(long i = (long)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				A = N/i;
				break;
			}
		} long i = (long)Math.sqrt(N); long i = (long)Math.sqrt(N); i (long)Math.sqrt(N) Math.sqrt Math N i > 0 i 0 i-- i-- i {
			if(N%i==0) {
				A = N/i;
				break;
			}
		} {
			if(N%i==0) {
				A = N/i;
				break;
			}
		} if(N%i==0) {
				A = N/i;
				break;
			} N%i==0 N%i N i 0 {
				A = N/i;
				break;
			} A = N/i A N/i N i break; while(A >0) {
			ans++;
			A/=10;
		} A >0 A 0 {
			ans++;
			A/=10;
		} ans++ ans A/=10 A 10 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long N = scn.nextLong();
		int ans = 0;
		long A = 1;
		for(long i = (long)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				A = N/i;
				break;
			}
		}

		while(A >0) {
			ans++;
			A/=10;
		}
		System.out.println(ans);
	}

} public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long N = scn.nextLong();
		int ans = 0;
		long A = 1;
		for(long i = (long)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				A = N/i;
				break;
			}
		}

		while(A >0) {
			ans++;
			A/=10;
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long N = scn.nextLong();
		int ans = 0;
		long A = 1;
		for(long i = (long)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				A = N/i;
				break;
			}
		}

		while(A >0) {
			ans++;
			A/=10;
		}
		System.out.println(ans);
	}

}
