import java.util.Scanner;

public class Main {


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int answer = Integer.MAX_VALUE;
        for (long i = 1; i*i <= N; i++) {
            if (N % i == 0) {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            }
        }

        System.out.println(answer);

    }

    private static int digitLength(long i) {
        return Long.toString(i).length();
    }


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


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int answer = Integer.MAX_VALUE;
        for (long i = 1; i*i <= N; i++) {
            if (N % i == 0) {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            }
        }

        System.out.println(answer);

    }

    private static int digitLength(long i) {
        return Long.toString(i).length();
    }


} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int answer = Integer.MAX_VALUE;
        for (long i = 1; i*i <= N; i++) {
            if (N % i == 0) {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            }
        }

        System.out.println(answer);

    } main {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int answer = Integer.MAX_VALUE;
        for (long i = 1; i*i <= N; i++) {
            if (N % i == 0) {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            }
        }

        System.out.println(answer);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int answer = Integer.MAX_VALUE; answer Integer.MAX_VALUE Integer Integer.MAX_VALUE for (long i = 1; i*i <= N; i++) {
            if (N % i == 0) {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            }
        } long i = 1; long i = 1; i 1 i*i <= N i*i i i N i++ i++ i {
            if (N % i == 0) {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            }
        } {
            if (N % i == 0) {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            }
        } if (N % i == 0) {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            } N % i == 0 N % i N i 0 {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            } int F = Math.max(digitLength(i), digitLength(N / i)); F Math.max(digitLength(i), digitLength(N / i)) Math.max Math digitLength(i) digitLength i digitLength(N / i) digitLength N / i N i if (answer > F) {
                    answer = F;
                } answer > F answer F {
                    answer = F;
                } answer = F answer F System.out.println(answer) System.out.println System.out System System.out answer String[] args args private static int digitLength(long i) {
        return Long.toString(i).length();
    } digitLength {
        return Long.toString(i).length();
    } return Long.toString(i).length(); Long.toString(i).length() Long.toString(i).length Long.toString(i) Long.toString Long i long i i public class Main {


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int answer = Integer.MAX_VALUE;
        for (long i = 1; i*i <= N; i++) {
            if (N % i == 0) {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            }
        }

        System.out.println(answer);

    }

    private static int digitLength(long i) {
        return Long.toString(i).length();
    }


} public class Main {


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int answer = Integer.MAX_VALUE;
        for (long i = 1; i*i <= N; i++) {
            if (N % i == 0) {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            }
        }

        System.out.println(answer);

    }

    private static int digitLength(long i) {
        return Long.toString(i).length();
    }


} Main
import java.util.Scanner;

public class Main {


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int answer = Integer.MAX_VALUE;
        for (long i = 1; i*i <= N; i++) {
            if (N % i == 0) {
                int F = Math.max(digitLength(i), digitLength(N / i));
                if (answer > F) {
                    answer = F;
                }
            }
        }

        System.out.println(answer);

    }

    private static int digitLength(long i) {
        return Long.toString(i).length();
    }


}