import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		long N=stdIn.nextLong();
		long A=1,B=1,min=N;
		while(A<=Math.sqrt(N)){
			if(N%A==0){
				B=N/A;
				String a=String.valueOf(A);
				String b=String.valueOf(B);
				if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length();
			}
			A++;
		}
		System.out.println(min);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		long N=stdIn.nextLong();
		long A=1,B=1,min=N;
		while(A<=Math.sqrt(N)){
			if(N%A==0){
				B=N/A;
				String a=String.valueOf(A);
				String b=String.valueOf(B);
				if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length();
			}
			A++;
		}
		System.out.println(min);
	}
} Main public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		long N=stdIn.nextLong();
		long A=1,B=1,min=N;
		while(A<=Math.sqrt(N)){
			if(N%A==0){
				B=N/A;
				String a=String.valueOf(A);
				String b=String.valueOf(B);
				if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length();
			}
			A++;
		}
		System.out.println(min);
	} main {
		Scanner stdIn=new Scanner(System.in);
		long N=stdIn.nextLong();
		long A=1,B=1,min=N;
		while(A<=Math.sqrt(N)){
			if(N%A==0){
				B=N/A;
				String a=String.valueOf(A);
				String b=String.valueOf(B);
				if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length();
			}
			A++;
		}
		System.out.println(min);
	} Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) long N=stdIn.nextLong(); N stdIn.nextLong() stdIn.nextLong stdIn long A=1 A 1 B=1 B 1 min=N; min N while(A<=Math.sqrt(N)){
			if(N%A==0){
				B=N/A;
				String a=String.valueOf(A);
				String b=String.valueOf(B);
				if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length();
			}
			A++;
		} A<=Math.sqrt(N) A Math.sqrt(N) Math.sqrt Math N {
			if(N%A==0){
				B=N/A;
				String a=String.valueOf(A);
				String b=String.valueOf(B);
				if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length();
			}
			A++;
		} if(N%A==0){
				B=N/A;
				String a=String.valueOf(A);
				String b=String.valueOf(B);
				if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length();
			} N%A==0 N%A N A 0 {
				B=N/A;
				String a=String.valueOf(A);
				String b=String.valueOf(B);
				if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length();
			} B=N/A B N/A N A String a=String.valueOf(A); a String.valueOf(A) String.valueOf String A String b=String.valueOf(B); b String.valueOf(B) String.valueOf String B if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length(); a.length()<=b.length() a.length() a.length a b.length() b.length b {
					if(min>b.length())
						min=b.length();
				} if(min>b.length())
						min=b.length(); min>b.length() min b.length() b.length b min=b.length() min b.length() b.length b if(min>a.length())
						min=a.length(); min>a.length() min a.length() a.length a min=a.length() min a.length() a.length a A++ A System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		long N=stdIn.nextLong();
		long A=1,B=1,min=N;
		while(A<=Math.sqrt(N)){
			if(N%A==0){
				B=N/A;
				String a=String.valueOf(A);
				String b=String.valueOf(B);
				if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length();
			}
			A++;
		}
		System.out.println(min);
	}
} public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		long N=stdIn.nextLong();
		long A=1,B=1,min=N;
		while(A<=Math.sqrt(N)){
			if(N%A==0){
				B=N/A;
				String a=String.valueOf(A);
				String b=String.valueOf(B);
				if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length();
			}
			A++;
		}
		System.out.println(min);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		long N=stdIn.nextLong();
		long A=1,B=1,min=N;
		while(A<=Math.sqrt(N)){
			if(N%A==0){
				B=N/A;
				String a=String.valueOf(A);
				String b=String.valueOf(B);
				if(a.length()<=b.length()){
					if(min>b.length())
						min=b.length();
				}
				else
					if(min>a.length())
						min=a.length();
			}
			A++;
		}
		System.out.println(min);
	}
}