

import java.util.*;

public class Main {
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		long n=sc.nextLong();
		long right;
	
		long min=100000000000l;
		long max;
		for(long i=1;i<=Math.sqrt(n);i++)
		{
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			}
		}
		System.out.println(min);
		
	}

} 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 right;
	
		long min=100000000000l;
		long max;
		for(long i=1;i<=Math.sqrt(n);i++)
		{
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			}
		}
		System.out.println(min);
		
	}

} Main public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		long n=sc.nextLong();
		long right;
	
		long min=100000000000l;
		long max;
		for(long i=1;i<=Math.sqrt(n);i++)
		{
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			}
		}
		System.out.println(min);
		
	} main {
		Scanner sc=new Scanner(System.in);
		long n=sc.nextLong();
		long right;
	
		long min=100000000000l;
		long max;
		for(long i=1;i<=Math.sqrt(n);i++)
		{
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			}
		}
		System.out.println(min);
		
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) long n=sc.nextLong(); n sc.nextLong() sc.nextLong sc long right; right long min=100000000000l; min 100000000000l long max; max for(long i=1;i<=Math.sqrt(n);i++)
		{
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			}
		} long i=1; long i=1; i 1 i<=Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			}
		} {
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			}
		} if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			} n%i==0 n%i n i 0 {
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			} right=n/i right n/i n i if(right>i) max=right;
				else max=i; right>i right i max=right max right max=i max i min=Math.min(min,(long)Math.log10(max)+1) min Math.min(min,(long)Math.log10(max)+1) Math.min Math min (long)Math.log10(max)+1 (long)Math.log10(max) Math.log10 Math max 1 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 sc=new Scanner(System.in);
		long n=sc.nextLong();
		long right;
	
		long min=100000000000l;
		long max;
		for(long i=1;i<=Math.sqrt(n);i++)
		{
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			}
		}
		System.out.println(min);
		
	}

} public class Main {
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		long n=sc.nextLong();
		long right;
	
		long min=100000000000l;
		long max;
		for(long i=1;i<=Math.sqrt(n);i++)
		{
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			}
		}
		System.out.println(min);
		
	}

} Main


import java.util.*;

public class Main {
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		long n=sc.nextLong();
		long right;
	
		long min=100000000000l;
		long max;
		for(long i=1;i<=Math.sqrt(n);i++)
		{
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);
				
			}
		}
		System.out.println(min);
		
	}

}
