import java.util.Scanner;
class Main{
	   public static void main(String[] args){
	  Scanner scan =  new Scanner(System.in);
	   long a = scan.nextLong();
	   long e =0;
	   long f = a;
	   for(long i=1;i*i<=a;i++){ 
		   long b=0;
		   if(a%i==0){
			   b = a/i;
			   int d = String.valueOf( b ).length();
	           int c = String.valueOf(i).length();
	           e =  Math.max(d,c);
		   }
		   if(e<f){
			   f=e;
		   }
		   
	   }
	   System.out.println(f);
	   }
	} import java.util.Scanner; Scanner java.util class Main{
	   public static void main(String[] args){
	  Scanner scan =  new Scanner(System.in);
	   long a = scan.nextLong();
	   long e =0;
	   long f = a;
	   for(long i=1;i*i<=a;i++){ 
		   long b=0;
		   if(a%i==0){
			   b = a/i;
			   int d = String.valueOf( b ).length();
	           int c = String.valueOf(i).length();
	           e =  Math.max(d,c);
		   }
		   if(e<f){
			   f=e;
		   }
		   
	   }
	   System.out.println(f);
	   }
	} Main public static void main(String[] args){
	  Scanner scan =  new Scanner(System.in);
	   long a = scan.nextLong();
	   long e =0;
	   long f = a;
	   for(long i=1;i*i<=a;i++){ 
		   long b=0;
		   if(a%i==0){
			   b = a/i;
			   int d = String.valueOf( b ).length();
	           int c = String.valueOf(i).length();
	           e =  Math.max(d,c);
		   }
		   if(e<f){
			   f=e;
		   }
		   
	   }
	   System.out.println(f);
	   } main {
	  Scanner scan =  new Scanner(System.in);
	   long a = scan.nextLong();
	   long e =0;
	   long f = a;
	   for(long i=1;i*i<=a;i++){ 
		   long b=0;
		   if(a%i==0){
			   b = a/i;
			   int d = String.valueOf( b ).length();
	           int c = String.valueOf(i).length();
	           e =  Math.max(d,c);
		   }
		   if(e<f){
			   f=e;
		   }
		   
	   }
	   System.out.println(f);
	   } Scanner scan =  new Scanner(System.in); scan new Scanner(System.in) long a = scan.nextLong(); a scan.nextLong() scan.nextLong scan long e =0; e 0 long f = a; f a for(long i=1;i*i<=a;i++){ 
		   long b=0;
		   if(a%i==0){
			   b = a/i;
			   int d = String.valueOf( b ).length();
	           int c = String.valueOf(i).length();
	           e =  Math.max(d,c);
		   }
		   if(e<f){
			   f=e;
		   }
		   
	   } long i=1; long i=1; i 1 i*i<=a i*i i i a i++ i++ i { 
		   long b=0;
		   if(a%i==0){
			   b = a/i;
			   int d = String.valueOf( b ).length();
	           int c = String.valueOf(i).length();
	           e =  Math.max(d,c);
		   }
		   if(e<f){
			   f=e;
		   }
		   
	   } { 
		   long b=0;
		   if(a%i==0){
			   b = a/i;
			   int d = String.valueOf( b ).length();
	           int c = String.valueOf(i).length();
	           e =  Math.max(d,c);
		   }
		   if(e<f){
			   f=e;
		   }
		   
	   } long b=0; b 0 if(a%i==0){
			   b = a/i;
			   int d = String.valueOf( b ).length();
	           int c = String.valueOf(i).length();
	           e =  Math.max(d,c);
		   } a%i==0 a%i a i 0 {
			   b = a/i;
			   int d = String.valueOf( b ).length();
	           int c = String.valueOf(i).length();
	           e =  Math.max(d,c);
		   } b = a/i b a/i a i int d = String.valueOf( b ).length(); d String.valueOf( b ).length() String.valueOf( b ).length String.valueOf( b ) String.valueOf String b int c = String.valueOf(i).length(); c String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i e =  Math.max(d,c) e Math.max(d,c) Math.max Math d c if(e<f){
			   f=e;
		   } e<f e f {
			   f=e;
		   } f=e f e System.out.println(f) System.out.println System.out System System.out f String[] args args
import java.util.Scanner;
class Main{
	   public static void main(String[] args){
	  Scanner scan =  new Scanner(System.in);
	   long a = scan.nextLong();
	   long e =0;
	   long f = a;
	   for(long i=1;i*i<=a;i++){ 
		   long b=0;
		   if(a%i==0){
			   b = a/i;
			   int d = String.valueOf( b ).length();
	           int c = String.valueOf(i).length();
	           e =  Math.max(d,c);
		   }
		   if(e<f){
			   f=e;
		   }
		   
	   }
	   System.out.println(f);
	   }
	}