

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long res = Integer.MAX_VALUE;

        for(long i = 1L; i*i<=N; i++) {
            if(N%i!=0) continue;
            if(N%i==0) {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            }
        }
        System.out.println(res);
    }
} 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();
        long res = Integer.MAX_VALUE;

        for(long i = 1L; i*i<=N; i++) {
            if(N%i!=0) continue;
            if(N%i==0) {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            }
        }
        System.out.println(res);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long res = Integer.MAX_VALUE;

        for(long i = 1L; i*i<=N; i++) {
            if(N%i!=0) continue;
            if(N%i==0) {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            }
        }
        System.out.println(res);
    } main {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long res = Integer.MAX_VALUE;

        for(long i = 1L; i*i<=N; i++) {
            if(N%i!=0) continue;
            if(N%i==0) {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            }
        }
        System.out.println(res);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long res = Integer.MAX_VALUE; res Integer.MAX_VALUE Integer Integer.MAX_VALUE for(long i = 1L; i*i<=N; i++) {
            if(N%i!=0) continue;
            if(N%i==0) {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            }
        } long i = 1L; long i = 1L; i 1L i*i<=N i*i i i N i++ i++ i {
            if(N%i!=0) continue;
            if(N%i==0) {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            }
        } {
            if(N%i!=0) continue;
            if(N%i==0) {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            }
        } if(N%i!=0) continue; N%i!=0 N%i N i 0 continue; if(N%i==0) {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            } N%i==0 N%i N i 0 {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            } long len1 = String.valueOf(i).length(); len1 String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i long len2 = String.valueOf(N/i).length(); len2 String.valueOf(N/i).length() String.valueOf(N/i).length String.valueOf(N/i) String.valueOf String N/i N i res = Math.min(res, Math.max(len1, len2)) res Math.min(res, Math.max(len1, len2)) Math.min Math res Math.max(len1, len2) Math.max Math len1 len2 System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long res = Integer.MAX_VALUE;

        for(long i = 1L; i*i<=N; i++) {
            if(N%i!=0) continue;
            if(N%i==0) {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            }
        }
        System.out.println(res);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long res = Integer.MAX_VALUE;

        for(long i = 1L; i*i<=N; i++) {
            if(N%i!=0) continue;
            if(N%i==0) {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            }
        }
        System.out.println(res);
    }
} Main


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long res = Integer.MAX_VALUE;

        for(long i = 1L; i*i<=N; i++) {
            if(N%i!=0) continue;
            if(N%i==0) {
                long len1 = String.valueOf(i).length();
                long len2 = String.valueOf(N/i).length();

                res = Math.min(res, Math.max(len1, len2));
            }
        }
        System.out.println(res);
    }
}
