import java.util.*;

public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();

    sc.close();

    int digits = countDigits(N);

    for (long A = 1; A * A <= N; A++) {
      if (N % A != 0) {
        continue;
      }
      long B = N / A;
      int digits_ = Math.max(countDigits(B), countDigits(A));
      digits = Math.min(digits, digits_);
    }

    System.out.println(digits);
    
  }

  static int countDigits(long N){
    
    int digits = 0;

    while (0 < N) {
      N /= 10;
      digits++;
    }
    
    return digits;
  
  }

} import java.util.*; util.* java public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();

    sc.close();

    int digits = countDigits(N);

    for (long A = 1; A * A <= N; A++) {
      if (N % A != 0) {
        continue;
      }
      long B = N / A;
      int digits_ = Math.max(countDigits(B), countDigits(A));
      digits = Math.min(digits, digits_);
    }

    System.out.println(digits);
    
  }

  static int countDigits(long N){
    
    int digits = 0;

    while (0 < N) {
      N /= 10;
      digits++;
    }
    
    return digits;
  
  }

} Main public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();

    sc.close();

    int digits = countDigits(N);

    for (long A = 1; A * A <= N; A++) {
      if (N % A != 0) {
        continue;
      }
      long B = N / A;
      int digits_ = Math.max(countDigits(B), countDigits(A));
      digits = Math.min(digits, digits_);
    }

    System.out.println(digits);
    
  } main {

    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();

    sc.close();

    int digits = countDigits(N);

    for (long A = 1; A * A <= N; A++) {
      if (N % A != 0) {
        continue;
      }
      long B = N / A;
      int digits_ = Math.max(countDigits(B), countDigits(A));
      digits = Math.min(digits, digits_);
    }

    System.out.println(digits);
    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc sc.close() sc.close sc int digits = countDigits(N); digits countDigits(N) countDigits N for (long A = 1; A * A <= N; A++) {
      if (N % A != 0) {
        continue;
      }
      long B = N / A;
      int digits_ = Math.max(countDigits(B), countDigits(A));
      digits = Math.min(digits, digits_);
    } long A = 1; long A = 1; A 1 A * A <= N A * A A A N A++ A++ A {
      if (N % A != 0) {
        continue;
      }
      long B = N / A;
      int digits_ = Math.max(countDigits(B), countDigits(A));
      digits = Math.min(digits, digits_);
    } {
      if (N % A != 0) {
        continue;
      }
      long B = N / A;
      int digits_ = Math.max(countDigits(B), countDigits(A));
      digits = Math.min(digits, digits_);
    } if (N % A != 0) {
        continue;
      } N % A != 0 N % A N A 0 {
        continue;
      } continue; long B = N / A; B N / A N A int digits_ = Math.max(countDigits(B), countDigits(A)); digits_ Math.max(countDigits(B), countDigits(A)) Math.max Math countDigits(B) countDigits B countDigits(A) countDigits A digits = Math.min(digits, digits_) digits Math.min(digits, digits_) Math.min Math digits digits_ System.out.println(digits) System.out.println System.out System System.out digits String[] args args static int countDigits(long N){
    
    int digits = 0;

    while (0 < N) {
      N /= 10;
      digits++;
    }
    
    return digits;
  
  } countDigits {
    
    int digits = 0;

    while (0 < N) {
      N /= 10;
      digits++;
    }
    
    return digits;
  
  } int digits = 0; digits 0 while (0 < N) {
      N /= 10;
      digits++;
    } 0 < N 0 N {
      N /= 10;
      digits++;
    } N /= 10 N 10 digits++ digits return digits; digits long N N public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();

    sc.close();

    int digits = countDigits(N);

    for (long A = 1; A * A <= N; A++) {
      if (N % A != 0) {
        continue;
      }
      long B = N / A;
      int digits_ = Math.max(countDigits(B), countDigits(A));
      digits = Math.min(digits, digits_);
    }

    System.out.println(digits);
    
  }

  static int countDigits(long N){
    
    int digits = 0;

    while (0 < N) {
      N /= 10;
      digits++;
    }
    
    return digits;
  
  }

} public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();

    sc.close();

    int digits = countDigits(N);

    for (long A = 1; A * A <= N; A++) {
      if (N % A != 0) {
        continue;
      }
      long B = N / A;
      int digits_ = Math.max(countDigits(B), countDigits(A));
      digits = Math.min(digits, digits_);
    }

    System.out.println(digits);
    
  }

  static int countDigits(long N){
    
    int digits = 0;

    while (0 < N) {
      N /= 10;
      digits++;
    }
    
    return digits;
  
  }

} Main
import java.util.*;

public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();

    sc.close();

    int digits = countDigits(N);

    for (long A = 1; A * A <= N; A++) {
      if (N % A != 0) {
        continue;
      }
      long B = N / A;
      int digits_ = Math.max(countDigits(B), countDigits(A));
      digits = Math.min(digits, digits_);
    }

    System.out.println(digits);
    
  }

  static int countDigits(long N){
    
    int digits = 0;

    while (0 < N) {
      N /= 10;
      digits++;
    }
    
    return digits;
  
  }

}