import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		
		long N=sc.nextLong();
		
		long k=1;
		for(long i=1; i*i<=N; i++) {
			k=i;
		}
		k++;
		
		int a=0,b=0;
		long xa=0,xb=0;
		for(long j=k; k>=1; k--) {
			if(N%k==0) {
				xa=k;
				xb=N/k;
				while(xa>0) {
					a++;
					xa/=10;
				}
				
				while(xb>0) {
					b++;
					xb/=10;
				}
				System.out.println(Math.max(a, b));
				return;
			}
		}
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		
		long N=sc.nextLong();
		
		long k=1;
		for(long i=1; i*i<=N; i++) {
			k=i;
		}
		k++;
		
		int a=0,b=0;
		long xa=0,xb=0;
		for(long j=k; k>=1; k--) {
			if(N%k==0) {
				xa=k;
				xb=N/k;
				while(xa>0) {
					a++;
					xa/=10;
				}
				
				while(xb>0) {
					b++;
					xb/=10;
				}
				System.out.println(Math.max(a, b));
				return;
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		
		long N=sc.nextLong();
		
		long k=1;
		for(long i=1; i*i<=N; i++) {
			k=i;
		}
		k++;
		
		int a=0,b=0;
		long xa=0,xb=0;
		for(long j=k; k>=1; k--) {
			if(N%k==0) {
				xa=k;
				xb=N/k;
				while(xa>0) {
					a++;
					xa/=10;
				}
				
				while(xb>0) {
					b++;
					xb/=10;
				}
				System.out.println(Math.max(a, b));
				return;
			}
		}
	} main {
		Scanner sc=new Scanner(System.in);
		
		long N=sc.nextLong();
		
		long k=1;
		for(long i=1; i*i<=N; i++) {
			k=i;
		}
		k++;
		
		int a=0,b=0;
		long xa=0,xb=0;
		for(long j=k; k>=1; k--) {
			if(N%k==0) {
				xa=k;
				xb=N/k;
				while(xa>0) {
					a++;
					xa/=10;
				}
				
				while(xb>0) {
					b++;
					xb/=10;
				}
				System.out.println(Math.max(a, b));
				return;
			}
		}
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) long N=sc.nextLong(); N sc.nextLong() sc.nextLong sc long k=1; k 1 for(long i=1; i*i<=N; i++) {
			k=i;
		} long i=1; long i=1; i 1 i*i<=N i*i i i N i++ i++ i {
			k=i;
		} {
			k=i;
		} k=i k i k++ k int a=0 a 0 b=0; b 0 long xa=0 xa 0 xb=0; xb 0 for(long j=k; k>=1; k--) {
			if(N%k==0) {
				xa=k;
				xb=N/k;
				while(xa>0) {
					a++;
					xa/=10;
				}
				
				while(xb>0) {
					b++;
					xb/=10;
				}
				System.out.println(Math.max(a, b));
				return;
			}
		} long j=k; long j=k; j k k>=1 k 1 k-- k-- k {
			if(N%k==0) {
				xa=k;
				xb=N/k;
				while(xa>0) {
					a++;
					xa/=10;
				}
				
				while(xb>0) {
					b++;
					xb/=10;
				}
				System.out.println(Math.max(a, b));
				return;
			}
		} {
			if(N%k==0) {
				xa=k;
				xb=N/k;
				while(xa>0) {
					a++;
					xa/=10;
				}
				
				while(xb>0) {
					b++;
					xb/=10;
				}
				System.out.println(Math.max(a, b));
				return;
			}
		} if(N%k==0) {
				xa=k;
				xb=N/k;
				while(xa>0) {
					a++;
					xa/=10;
				}
				
				while(xb>0) {
					b++;
					xb/=10;
				}
				System.out.println(Math.max(a, b));
				return;
			} N%k==0 N%k N k 0 {
				xa=k;
				xb=N/k;
				while(xa>0) {
					a++;
					xa/=10;
				}
				
				while(xb>0) {
					b++;
					xb/=10;
				}
				System.out.println(Math.max(a, b));
				return;
			} xa=k xa k xb=N/k xb N/k N k while(xa>0) {
					a++;
					xa/=10;
				} xa>0 xa 0 {
					a++;
					xa/=10;
				} a++ a xa/=10 xa 10 while(xb>0) {
					b++;
					xb/=10;
				} xb>0 xb 0 {
					b++;
					xb/=10;
				} b++ b xb/=10 xb 10 System.out.println(Math.max(a, b)) System.out.println System.out System System.out Math.max(a, b) Math.max Math a b return; String[] args args
import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		
		long N=sc.nextLong();
		
		long k=1;
		for(long i=1; i*i<=N; i++) {
			k=i;
		}
		k++;
		
		int a=0,b=0;
		long xa=0,xb=0;
		for(long j=k; k>=1; k--) {
			if(N%k==0) {
				xa=k;
				xb=N/k;
				while(xa>0) {
					a++;
					xa/=10;
				}
				
				while(xb>0) {
					b++;
					xb/=10;
				}
				System.out.println(Math.max(a, b));
				return;
			}
		}
	}
}