import java.util.Scanner;

public class Main {

	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		long M = (long) Math.ceil(Math.sqrt(N));

		int ans = Integer.MAX_VALUE;
		for(long i=M;i>0;i--) {
			if(N%i == 0) {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			}
		}
		System.out.println(ans);
	}
} 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();

		long M = (long) Math.ceil(Math.sqrt(N));

		int ans = Integer.MAX_VALUE;
		for(long i=M;i>0;i--) {
			if(N%i == 0) {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String args[]){

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		long M = (long) Math.ceil(Math.sqrt(N));

		int ans = Integer.MAX_VALUE;
		for(long i=M;i>0;i--) {
			if(N%i == 0) {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			}
		}
		System.out.println(ans);
	} main {

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		long M = (long) Math.ceil(Math.sqrt(N));

		int ans = Integer.MAX_VALUE;
		for(long i=M;i>0;i--) {
			if(N%i == 0) {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			}
		}
		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 long M = (long) Math.ceil(Math.sqrt(N)); M (long) Math.ceil(Math.sqrt(N)) Math.ceil Math Math.sqrt(N) Math.sqrt Math N int ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE for(long i=M;i>0;i--) {
			if(N%i == 0) {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			}
		} long i=M; long i=M; i M i>0 i 0 i-- i-- i {
			if(N%i == 0) {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			}
		} {
			if(N%i == 0) {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			}
		} if(N%i == 0) {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			} N%i == 0 N%i N i 0 {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			} int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length()); f Math.max(String.valueOf(i).length(),String.valueOf(N/i).length()) Math.max Math String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i String.valueOf(N/i).length() String.valueOf(N/i).length String.valueOf(N/i) String.valueOf String N/i N i if(ans > f) {
					ans = f;
				} ans > f ans f {
					ans = f;
				} ans = f ans f 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 sc = new Scanner(System.in);
		long N = sc.nextLong();

		long M = (long) Math.ceil(Math.sqrt(N));

		int ans = Integer.MAX_VALUE;
		for(long i=M;i>0;i--) {
			if(N%i == 0) {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			}
		}
		System.out.println(ans);
	}
} public class Main {

	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		long M = (long) Math.ceil(Math.sqrt(N));

		int ans = Integer.MAX_VALUE;
		for(long i=M;i>0;i--) {
			if(N%i == 0) {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		long M = (long) Math.ceil(Math.sqrt(N));

		int ans = Integer.MAX_VALUE;
		for(long i=M;i>0;i--) {
			if(N%i == 0) {
				int f = Math.max(String.valueOf(i).length(),String.valueOf(N/i).length());
				if(ans > f) {
					ans = f;
				}
			}
		}
		System.out.println(ans);
	}
}
