import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    long n = scan.nextLong();

    long start = (long) Math.sqrt(n);
    
    for (long i = start; i >= 1; i--) {
      if (n % i == 0) {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      }
    }

  }

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

  public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    long n = scan.nextLong();

    long start = (long) Math.sqrt(n);
    
    for (long i = start; i >= 1; i--) {
      if (n % i == 0) {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      }
    }

  }

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

    Scanner scan = new Scanner(System.in);

    long n = scan.nextLong();

    long start = (long) Math.sqrt(n);
    
    for (long i = start; i >= 1; i--) {
      if (n % i == 0) {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      }
    }

  } main {

    Scanner scan = new Scanner(System.in);

    long n = scan.nextLong();

    long start = (long) Math.sqrt(n);
    
    for (long i = start; i >= 1; i--) {
      if (n % i == 0) {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      }
    }

  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long n = scan.nextLong(); n scan.nextLong() scan.nextLong scan long start = (long) Math.sqrt(n); start (long) Math.sqrt(n) Math.sqrt Math n for (long i = start; i >= 1; i--) {
      if (n % i == 0) {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      }
    } long i = start; long i = start; i start i >= 1 i 1 i-- i-- i {
      if (n % i == 0) {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      }
    } {
      if (n % i == 0) {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      }
    } if (n % i == 0) {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      } n % i == 0 n % i n i 0 {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      } String str = Long.toString(Math.max(i, n / i)); str Long.toString(Math.max(i, n / i)) Long.toString Long Math.max(i, n / i) Math.max Math i n / i n i System.out.println(str.length()) System.out.println System.out System System.out str.length() str.length str return; String[] args args public class Main {

  public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    long n = scan.nextLong();

    long start = (long) Math.sqrt(n);
    
    for (long i = start; i >= 1; i--) {
      if (n % i == 0) {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      }
    }

  }

} public class Main {

  public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    long n = scan.nextLong();

    long start = (long) Math.sqrt(n);
    
    for (long i = start; i >= 1; i--) {
      if (n % i == 0) {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      }
    }

  }

} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    long n = scan.nextLong();

    long start = (long) Math.sqrt(n);
    
    for (long i = start; i >= 1; i--) {
      if (n % i == 0) {
        String str = Long.toString(Math.max(i, n / i));
        System.out.println(str.length());
        return;
      }
    }

  }

}