import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   long N = sc.nextLong();
   double Nroot = Math.sqrt(N);
   int Nrint = (int) Nroot;
   long tmp =N;
   for(int i =Nrint;i>=1;i--)
   {
     if(N%i==0) 
     {
       tmp = (long)N/i; 
       break;
     }
   }
   int ans =1;
   while(tmp>=10)
   {
     tmp/=10;
     ans++;
   }
   System.out.println(ans);
 }
} import java.util.*; util.* java public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   long N = sc.nextLong();
   double Nroot = Math.sqrt(N);
   int Nrint = (int) Nroot;
   long tmp =N;
   for(int i =Nrint;i>=1;i--)
   {
     if(N%i==0) 
     {
       tmp = (long)N/i; 
       break;
     }
   }
   int ans =1;
   while(tmp>=10)
   {
     tmp/=10;
     ans++;
   }
   System.out.println(ans);
 }
} Main public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   long N = sc.nextLong();
   double Nroot = Math.sqrt(N);
   int Nrint = (int) Nroot;
   long tmp =N;
   for(int i =Nrint;i>=1;i--)
   {
     if(N%i==0) 
     {
       tmp = (long)N/i; 
       break;
     }
   }
   int ans =1;
   while(tmp>=10)
   {
     tmp/=10;
     ans++;
   }
   System.out.println(ans);
 } main {
   Scanner sc = new Scanner(System.in);
   long N = sc.nextLong();
   double Nroot = Math.sqrt(N);
   int Nrint = (int) Nroot;
   long tmp =N;
   for(int i =Nrint;i>=1;i--)
   {
     if(N%i==0) 
     {
       tmp = (long)N/i; 
       break;
     }
   }
   int ans =1;
   while(tmp>=10)
   {
     tmp/=10;
     ans++;
   }
   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 double Nroot = Math.sqrt(N); Nroot Math.sqrt(N) Math.sqrt Math N int Nrint = (int) Nroot; Nrint (int) Nroot long tmp =N; tmp N for(int i =Nrint;i>=1;i--)
   {
     if(N%i==0) 
     {
       tmp = (long)N/i; 
       break;
     }
   } int i =Nrint; int i =Nrint; i Nrint i>=1 i 1 i-- i-- i {
     if(N%i==0) 
     {
       tmp = (long)N/i; 
       break;
     }
   } {
     if(N%i==0) 
     {
       tmp = (long)N/i; 
       break;
     }
   } if(N%i==0) 
     {
       tmp = (long)N/i; 
       break;
     } N%i==0 N%i N i 0 {
       tmp = (long)N/i; 
       break;
     } tmp = (long)N/i tmp (long)N/i (long)N i break; int ans =1; ans 1 while(tmp>=10)
   {
     tmp/=10;
     ans++;
   } tmp>=10 tmp 10 {
     tmp/=10;
     ans++;
   } tmp/=10 tmp 10 ans++ ans 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();
   double Nroot = Math.sqrt(N);
   int Nrint = (int) Nroot;
   long tmp =N;
   for(int i =Nrint;i>=1;i--)
   {
     if(N%i==0) 
     {
       tmp = (long)N/i; 
       break;
     }
   }
   int ans =1;
   while(tmp>=10)
   {
     tmp/=10;
     ans++;
   }
   System.out.println(ans);
 }
} public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   long N = sc.nextLong();
   double Nroot = Math.sqrt(N);
   int Nrint = (int) Nroot;
   long tmp =N;
   for(int i =Nrint;i>=1;i--)
   {
     if(N%i==0) 
     {
       tmp = (long)N/i; 
       break;
     }
   }
   int ans =1;
   while(tmp>=10)
   {
     tmp/=10;
     ans++;
   }
   System.out.println(ans);
 }
} Main
import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   long N = sc.nextLong();
   double Nroot = Math.sqrt(N);
   int Nrint = (int) Nroot;
   long tmp =N;
   for(int i =Nrint;i>=1;i--)
   {
     if(N%i==0) 
     {
       tmp = (long)N/i; 
       break;
     }
   }
   int ans =1;
   while(tmp>=10)
   {
     tmp/=10;
     ans++;
   }
   System.out.println(ans);
 }
}