import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    long n = Long.parseLong(in.readLine());
    in.close();
    
    long k = (int)Math.sqrt(n);
    while(n%k!=0){
      k--;
    }
    
    System.out.println(Math.max(String.valueOf(k).length(),
                                String.valueOf(n/k).length()));
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    long n = Long.parseLong(in.readLine());
    in.close();
    
    long k = (int)Math.sqrt(n);
    while(n%k!=0){
      k--;
    }
    
    System.out.println(Math.max(String.valueOf(k).length(),
                                String.valueOf(n/k).length()));
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    long n = Long.parseLong(in.readLine());
    in.close();
    
    long k = (int)Math.sqrt(n);
    while(n%k!=0){
      k--;
    }
    
    System.out.println(Math.max(String.valueOf(k).length(),
                                String.valueOf(n/k).length()));
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    long n = Long.parseLong(in.readLine());
    in.close();
    
    long k = (int)Math.sqrt(n);
    while(n%k!=0){
      k--;
    }
    
    System.out.println(Math.max(String.valueOf(k).length(),
                                String.valueOf(n/k).length()));
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) long n = Long.parseLong(in.readLine()); n Long.parseLong(in.readLine()) Long.parseLong Long in.readLine() in.readLine in in.close() in.close in long k = (int)Math.sqrt(n); k (int)Math.sqrt(n) Math.sqrt Math n while(n%k!=0){
      k--;
    } n%k!=0 n%k n k 0 {
      k--;
    } k-- k System.out.println(Math.max(String.valueOf(k).length(),
                                String.valueOf(n/k).length())) System.out.println System.out System System.out Math.max(String.valueOf(k).length(),
                                String.valueOf(n/k).length()) Math.max Math String.valueOf(k).length() String.valueOf(k).length String.valueOf(k) String.valueOf String k String.valueOf(n/k).length() String.valueOf(n/k).length String.valueOf(n/k) String.valueOf String n/k n k String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    long n = Long.parseLong(in.readLine());
    in.close();
    
    long k = (int)Math.sqrt(n);
    while(n%k!=0){
      k--;
    }
    
    System.out.println(Math.max(String.valueOf(k).length(),
                                String.valueOf(n/k).length()));
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    long n = Long.parseLong(in.readLine());
    in.close();
    
    long k = (int)Math.sqrt(n);
    while(n%k!=0){
      k--;
    }
    
    System.out.println(Math.max(String.valueOf(k).length(),
                                String.valueOf(n/k).length()));
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    long n = Long.parseLong(in.readLine());
    in.close();
    
    long k = (int)Math.sqrt(n);
    while(n%k!=0){
      k--;
    }
    
    System.out.println(Math.max(String.valueOf(k).length(),
                                String.valueOf(n/k).length()));
  }
}