import java.util.*;
class Main{
    public static void main(String[]args){
        Scanner cin=new Scanner(System.in);
        long input;
        long larger;
        int min=11;
        input=cin.nextLong();
        for(long i=1;i*i<=input;i++){
            if(input%i==0){
                larger=(long)input/i;
                if(min>String.valueOf(larger).length()){
                    min = String.valueOf(larger).length();
                }
            }
        }
        System.out.println(min);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[]args){
        Scanner cin=new Scanner(System.in);
        long input;
        long larger;
        int min=11;
        input=cin.nextLong();
        for(long i=1;i*i<=input;i++){
            if(input%i==0){
                larger=(long)input/i;
                if(min>String.valueOf(larger).length()){
                    min = String.valueOf(larger).length();
                }
            }
        }
        System.out.println(min);
    }
} Main public static void main(String[]args){
        Scanner cin=new Scanner(System.in);
        long input;
        long larger;
        int min=11;
        input=cin.nextLong();
        for(long i=1;i*i<=input;i++){
            if(input%i==0){
                larger=(long)input/i;
                if(min>String.valueOf(larger).length()){
                    min = String.valueOf(larger).length();
                }
            }
        }
        System.out.println(min);
    } main {
        Scanner cin=new Scanner(System.in);
        long input;
        long larger;
        int min=11;
        input=cin.nextLong();
        for(long i=1;i*i<=input;i++){
            if(input%i==0){
                larger=(long)input/i;
                if(min>String.valueOf(larger).length()){
                    min = String.valueOf(larger).length();
                }
            }
        }
        System.out.println(min);
    } Scanner cin=new Scanner(System.in); cin new Scanner(System.in) long input; input long larger; larger int min=11; min 11 input=cin.nextLong() input cin.nextLong() cin.nextLong cin for(long i=1;i*i<=input;i++){
            if(input%i==0){
                larger=(long)input/i;
                if(min>String.valueOf(larger).length()){
                    min = String.valueOf(larger).length();
                }
            }
        } long i=1; long i=1; i 1 i*i<=input i*i i i input i++ i++ i {
            if(input%i==0){
                larger=(long)input/i;
                if(min>String.valueOf(larger).length()){
                    min = String.valueOf(larger).length();
                }
            }
        } {
            if(input%i==0){
                larger=(long)input/i;
                if(min>String.valueOf(larger).length()){
                    min = String.valueOf(larger).length();
                }
            }
        } if(input%i==0){
                larger=(long)input/i;
                if(min>String.valueOf(larger).length()){
                    min = String.valueOf(larger).length();
                }
            } input%i==0 input%i input i 0 {
                larger=(long)input/i;
                if(min>String.valueOf(larger).length()){
                    min = String.valueOf(larger).length();
                }
            } larger=(long)input/i larger (long)input/i (long)input i if(min>String.valueOf(larger).length()){
                    min = String.valueOf(larger).length();
                } min>String.valueOf(larger).length() min String.valueOf(larger).length() String.valueOf(larger).length String.valueOf(larger) String.valueOf String larger {
                    min = String.valueOf(larger).length();
                } min = String.valueOf(larger).length() min String.valueOf(larger).length() String.valueOf(larger).length String.valueOf(larger) String.valueOf String larger System.out.println(min) System.out.println System.out System System.out min String[]args args
import java.util.*;
class Main{
    public static void main(String[]args){
        Scanner cin=new Scanner(System.in);
        long input;
        long larger;
        int min=11;
        input=cin.nextLong();
        for(long i=1;i*i<=input;i++){
            if(input%i==0){
                larger=(long)input/i;
                if(min>String.valueOf(larger).length()){
                    min = String.valueOf(larger).length();
                }
            }
        }
        System.out.println(min);
    }
}
