import java.util.Scanner;

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

        long ans = Long.MAX_VALUE;
        for(long a=1; a*a<=n; a++) {
            if(n % a == 0) {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            }
        }
        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();

        long ans = Long.MAX_VALUE;
        for(long a=1; a*a<=n; a++) {
            if(n % a == 0) {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long ans = Long.MAX_VALUE;
        for(long a=1; a*a<=n; a++) {
            if(n % a == 0) {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long ans = Long.MAX_VALUE;
        for(long a=1; a*a<=n; a++) {
            if(n % a == 0) {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            }
        }
        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 long ans = Long.MAX_VALUE; ans Long.MAX_VALUE Long Long.MAX_VALUE for(long a=1; a*a<=n; a++) {
            if(n % a == 0) {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            }
        } long a=1; long a=1; a 1 a*a<=n a*a a a n a++ a++ a {
            if(n % a == 0) {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            }
        } {
            if(n % a == 0) {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            }
        } if(n % a == 0) {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            } n % a == 0 n % a n a 0 {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            } long b = n / a; b n / a n a int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length()); digits Math.max(String.valueOf(a).length(), String.valueOf(b).length()) Math.max Math String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b ans = Math.min(ans,digits) ans Math.min(ans,digits) Math.min Math ans digits 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();

        long ans = Long.MAX_VALUE;
        for(long a=1; a*a<=n; a++) {
            if(n % a == 0) {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            }
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long ans = Long.MAX_VALUE;
        for(long a=1; a*a<=n; a++) {
            if(n % a == 0) {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            }
        }
        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();

        long ans = Long.MAX_VALUE;
        for(long a=1; a*a<=n; a++) {
            if(n % a == 0) {
                long b = n / a;
                int digits = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                ans = Math.min(ans,digits);
            }
        }
        System.out.println(ans);
    }
}
