import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = 11;
        for (int i = 1 ; i <= Math.sqrt(n) ; i++) {
            if ((long) n % i == 0) {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }

        }
        System.out.println(ans);
    }

} 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 ans = 11;
        for (int i = 1 ; i <= Math.sqrt(n) ; i++) {
            if ((long) n % i == 0) {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }

        }
        System.out.println(ans);
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = 11;
        for (int i = 1 ; i <= Math.sqrt(n) ; i++) {
            if ((long) n % i == 0) {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }

        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = 11;
        for (int i = 1 ; i <= Math.sqrt(n) ; i++) {
            if ((long) n % i == 0) {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }

        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int ans = 11; ans 11 for (int i = 1 ; i <= Math.sqrt(n) ; i++) {
            if ((long) n % i == 0) {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }

        } int i = 1 ; int i = 1 ; i 1 i <= Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
            if ((long) n % i == 0) {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }

        } {
            if ((long) n % i == 0) {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }

        } if ((long) n % i == 0) {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            } (long) n % i == 0 (long) n % i (long) n i 0 {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            } long b = (long) n / i; b (long) n / i (long) n i int c = 0; c 0 while (b > 0) {
                    b /= 10;
                    c++;
                } b > 0 b 0 {
                    b /= 10;
                    c++;
                } b /= 10 b 10 c++ c ans = Math.min(ans, c) ans Math.min(ans, c) Math.min Math ans c System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = 11;
        for (int i = 1 ; i <= Math.sqrt(n) ; i++) {
            if ((long) n % i == 0) {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }

        }
        System.out.println(ans);
    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = 11;
        for (int i = 1 ; i <= Math.sqrt(n) ; i++) {
            if ((long) n % i == 0) {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }

        }
        System.out.println(ans);
    }

} 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 ans = 11;
        for (int i = 1 ; i <= Math.sqrt(n) ; i++) {
            if ((long) n % i == 0) {
                long b = (long) n / i;
                int c = 0;
                while (b > 0) {
                    b /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }

        }
        System.out.println(ans);
    }

}