import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        int ans = Long.toString(a).length();
        for(long i=1; i*i<=a; i++) {
            if(a%i ==0 ) {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            }
        }
        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 a = sc.nextLong();
        int ans = Long.toString(a).length();
        for(long i=1; i*i<=a; i++) {
            if(a%i ==0 ) {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        int ans = Long.toString(a).length();
        for(long i=1; i*i<=a; i++) {
            if(a%i ==0 ) {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        int ans = Long.toString(a).length();
        for(long i=1; i*i<=a; i++) {
            if(a%i ==0 ) {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc int ans = Long.toString(a).length(); ans Long.toString(a).length() Long.toString(a).length Long.toString(a) Long.toString Long a for(long i=1; i*i<=a; i++) {
            if(a%i ==0 ) {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            }
        } long i=1; long i=1; i 1 i*i<=a i*i i i a i++ i++ i {
            if(a%i ==0 ) {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            }
        } {
            if(a%i ==0 ) {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            }
        } if(a%i ==0 ) {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            } a%i ==0 a%i a i 0 {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            } int length = Long.toString(a/i).length(); length Long.toString(a/i).length() Long.toString(a/i).length Long.toString(a/i) Long.toString Long a/i a i if(ans > length) {
                    ans = length;
                } ans > length ans length {
                    ans = length;
                } ans = length ans length 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 a = sc.nextLong();
        int ans = Long.toString(a).length();
        for(long i=1; i*i<=a; i++) {
            if(a%i ==0 ) {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            }
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        int ans = Long.toString(a).length();
        for(long i=1; i*i<=a; i++) {
            if(a%i ==0 ) {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            }
        }
        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 a = sc.nextLong();
        int ans = Long.toString(a).length();
        for(long i=1; i*i<=a; i++) {
            if(a%i ==0 ) {
                int length = Long.toString(a/i).length();
                if(ans > length) {
                    ans = length;
                }
            }
        }
        System.out.println(ans);
    }
}