import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Long n = sc.nextLong();
        int to = (int) Math.round(Math.sqrt(n));
        int ans = Integer.MAX_VALUE;
        for(long a = 1L; a<=to; a++) {
            if(n%a==0){
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).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 n = sc.nextLong();
        int to = (int) Math.round(Math.sqrt(n));
        int ans = Integer.MAX_VALUE;
        for(long a = 1L; a<=to; a++) {
            if(n%a==0){
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).length();
                }
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Long n = sc.nextLong();
        int to = (int) Math.round(Math.sqrt(n));
        int ans = Integer.MAX_VALUE;
        for(long a = 1L; a<=to; a++) {
            if(n%a==0){
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).length();
                }
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        Long n = sc.nextLong();
        int to = (int) Math.round(Math.sqrt(n));
        int ans = Integer.MAX_VALUE;
        for(long a = 1L; a<=to; a++) {
            if(n%a==0){
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).length();
                }
            }
        }
        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 to = (int) Math.round(Math.sqrt(n)); to (int) Math.round(Math.sqrt(n)) Math.round Math Math.sqrt(n) Math.sqrt Math n int ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE for(long a = 1L; a<=to; a++) {
            if(n%a==0){
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).length();
                }
            }
        } long a = 1L; long a = 1L; a 1L a<=to a to a++ a++ a {
            if(n%a==0){
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).length();
                }
            }
        } {
            if(n%a==0){
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).length();
                }
            }
        } if(n%a==0){
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).length();
                }
            } n%a==0 n%a n a 0 {
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).length();
                }
            } long b = n/a; b n/a n a if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).length();
                } ans > String.valueOf(Math.max(a, b)).length() ans String.valueOf(Math.max(a, b)).length() String.valueOf(Math.max(a, b)).length String.valueOf(Math.max(a, b)) String.valueOf String Math.max(a, b) Math.max Math a b {
                    ans = String.valueOf(Math.max(a, b)).length();
                } ans = String.valueOf(Math.max(a, b)).length() ans String.valueOf(Math.max(a, b)).length() String.valueOf(Math.max(a, b)).length String.valueOf(Math.max(a, b)) String.valueOf String Math.max(a, b) Math.max Math a b 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 to = (int) Math.round(Math.sqrt(n));
        int ans = Integer.MAX_VALUE;
        for(long a = 1L; a<=to; a++) {
            if(n%a==0){
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).length();
                }
            }
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Long n = sc.nextLong();
        int to = (int) Math.round(Math.sqrt(n));
        int ans = Integer.MAX_VALUE;
        for(long a = 1L; a<=to; a++) {
            if(n%a==0){
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).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 n = sc.nextLong();
        int to = (int) Math.round(Math.sqrt(n));
        int ans = Integer.MAX_VALUE;
        for(long a = 1L; a<=to; a++) {
            if(n%a==0){
                long b = n/a;
//                System.out.println(a+" "+b);
                if(ans > String.valueOf(Math.max(a, b)).length()){
                    ans = String.valueOf(Math.max(a, b)).length();
                }
            }
        }
        System.out.println(ans);
    }
}