import java.util.*;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n=sc.nextLong();
        long output=Long.MAX_VALUE;
        for(int i=1;i<Math.sqrt(n)+1;i++){
            if(n%i==0){
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            }
        }
        System.out.println(output);
    }
} import java.util.*; util.* java public class Main {
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n=sc.nextLong();
        long output=Long.MAX_VALUE;
        for(int i=1;i<Math.sqrt(n)+1;i++){
            if(n%i==0){
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            }
        }
        System.out.println(output);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n=sc.nextLong();
        long output=Long.MAX_VALUE;
        for(int i=1;i<Math.sqrt(n)+1;i++){
            if(n%i==0){
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            }
        }
        System.out.println(output);
    } main {
        Scanner sc = new Scanner(System.in);
        long n=sc.nextLong();
        long output=Long.MAX_VALUE;
        for(int i=1;i<Math.sqrt(n)+1;i++){
            if(n%i==0){
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            }
        }
        System.out.println(output);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n=sc.nextLong(); n sc.nextLong() sc.nextLong sc long output=Long.MAX_VALUE; output Long.MAX_VALUE Long Long.MAX_VALUE for(int i=1;i<Math.sqrt(n)+1;i++){
            if(n%i==0){
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            }
        } int i=1; int i=1; i 1 i<Math.sqrt(n)+1 i Math.sqrt(n)+1 Math.sqrt(n) Math.sqrt Math n 1 i++ i++ i {
            if(n%i==0){
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            }
        } {
            if(n%i==0){
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            }
        } if(n%i==0){
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            } n%i==0 n%i n i 0 {
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            } output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1) output Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1) Math.min Math output Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1 Math.max((long)Math.log10(i),(long)Math.log10(n/i)) Math.max Math (long)Math.log10(i) Math.log10 Math i (long)Math.log10(n/i) Math.log10 Math n/i n i 1 System.out.println(output) System.out.println System.out System System.out output String[] args args public class Main {
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n=sc.nextLong();
        long output=Long.MAX_VALUE;
        for(int i=1;i<Math.sqrt(n)+1;i++){
            if(n%i==0){
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            }
        }
        System.out.println(output);
    }
} public class Main {
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n=sc.nextLong();
        long output=Long.MAX_VALUE;
        for(int i=1;i<Math.sqrt(n)+1;i++){
            if(n%i==0){
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            }
        }
        System.out.println(output);
    }
} Main
import java.util.*;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n=sc.nextLong();
        long output=Long.MAX_VALUE;
        for(int i=1;i<Math.sqrt(n)+1;i++){
            if(n%i==0){
                output=Math.min(output,Math.max((long)Math.log10(i),(long)Math.log10(n/i))+1);
            }
        }
        System.out.println(output);
    }
}