import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        long N;
        N = scanner.nextLong();
        long ans =0;
        for(long i=1;i*i<=N;i++){
            if(N%i==0){
                ans =Math.max(ans,i);
            }
        }
        long digit = String.valueOf(N/ans).length();
        System.out.println(digit);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        long N;
        N = scanner.nextLong();
        long ans =0;
        for(long i=1;i*i<=N;i++){
            if(N%i==0){
                ans =Math.max(ans,i);
            }
        }
        long digit = String.valueOf(N/ans).length();
        System.out.println(digit);
    }
} Main public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        long N;
        N = scanner.nextLong();
        long ans =0;
        for(long i=1;i*i<=N;i++){
            if(N%i==0){
                ans =Math.max(ans,i);
            }
        }
        long digit = String.valueOf(N/ans).length();
        System.out.println(digit);
    } main {
        Scanner scanner = new Scanner(System.in);
        long N;
        N = scanner.nextLong();
        long ans =0;
        for(long i=1;i*i<=N;i++){
            if(N%i==0){
                ans =Math.max(ans,i);
            }
        }
        long digit = String.valueOf(N/ans).length();
        System.out.println(digit);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long N; N N = scanner.nextLong() N scanner.nextLong() scanner.nextLong scanner long ans =0; ans 0 for(long i=1;i*i<=N;i++){
            if(N%i==0){
                ans =Math.max(ans,i);
            }
        } long i=1; long i=1; i 1 i*i<=N i*i i i N i++ i++ i {
            if(N%i==0){
                ans =Math.max(ans,i);
            }
        } {
            if(N%i==0){
                ans =Math.max(ans,i);
            }
        } if(N%i==0){
                ans =Math.max(ans,i);
            } N%i==0 N%i N i 0 {
                ans =Math.max(ans,i);
            } ans =Math.max(ans,i) ans Math.max(ans,i) Math.max Math ans i long digit = String.valueOf(N/ans).length(); digit String.valueOf(N/ans).length() String.valueOf(N/ans).length String.valueOf(N/ans) String.valueOf String N/ans N ans System.out.println(digit) System.out.println System.out System System.out digit String args[] args public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        long N;
        N = scanner.nextLong();
        long ans =0;
        for(long i=1;i*i<=N;i++){
            if(N%i==0){
                ans =Math.max(ans,i);
            }
        }
        long digit = String.valueOf(N/ans).length();
        System.out.println(digit);
    }
} public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        long N;
        N = scanner.nextLong();
        long ans =0;
        for(long i=1;i*i<=N;i++){
            if(N%i==0){
                ans =Math.max(ans,i);
            }
        }
        long digit = String.valueOf(N/ans).length();
        System.out.println(digit);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        long N;
        N = scanner.nextLong();
        long ans =0;
        for(long i=1;i*i<=N;i++){
            if(N%i==0){
                ans =Math.max(ans,i);
            }
        }
        long digit = String.valueOf(N/ans).length();
        System.out.println(digit);
    }
}