import java.util.*;

class Main{
    static long digits(long n){
        long res = 0;
        while(n > 0){
            res++;
            n /= 10; 
        }
        return res;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();

        long f = 0;
        long ans = Long.MAX_VALUE;
        for(long i = 1; i*i <= N; i++){
            if(N % i == 0){
            f = Math.max(digits(i), digits(N / i));
            ans = Math.min(ans, f);
            }
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main{
    static long digits(long n){
        long res = 0;
        while(n > 0){
            res++;
            n /= 10; 
        }
        return res;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();

        long f = 0;
        long ans = Long.MAX_VALUE;
        for(long i = 1; i*i <= N; i++){
            if(N % i == 0){
            f = Math.max(digits(i), digits(N / i));
            ans = Math.min(ans, f);
            }
        }
        System.out.println(ans);
    }
} Main static long digits(long n){
        long res = 0;
        while(n > 0){
            res++;
            n /= 10; 
        }
        return res;
    } digits {
        long res = 0;
        while(n > 0){
            res++;
            n /= 10; 
        }
        return res;
    } long res = 0; res 0 while(n > 0){
            res++;
            n /= 10; 
        } n > 0 n 0 {
            res++;
            n /= 10; 
        } res++ res n /= 10 n 10 return res; res long n n public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();

        long f = 0;
        long ans = Long.MAX_VALUE;
        for(long i = 1; i*i <= N; i++){
            if(N % i == 0){
            f = Math.max(digits(i), digits(N / i));
            ans = Math.min(ans, f);
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();

        long f = 0;
        long ans = Long.MAX_VALUE;
        for(long i = 1; i*i <= N; i++){
            if(N % i == 0){
            f = Math.max(digits(i), digits(N / i));
            ans = Math.min(ans, f);
            }
        }
        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 f = 0; f 0 long ans = Long.MAX_VALUE; ans Long.MAX_VALUE Long Long.MAX_VALUE for(long i = 1; i*i <= N; i++){
            if(N % i == 0){
            f = Math.max(digits(i), digits(N / i));
            ans = Math.min(ans, f);
            }
        } long i = 1; long i = 1; i 1 i*i <= N i*i i i N i++ i++ i {
            if(N % i == 0){
            f = Math.max(digits(i), digits(N / i));
            ans = Math.min(ans, f);
            }
        } {
            if(N % i == 0){
            f = Math.max(digits(i), digits(N / i));
            ans = Math.min(ans, f);
            }
        } if(N % i == 0){
            f = Math.max(digits(i), digits(N / i));
            ans = Math.min(ans, f);
            } N % i == 0 N % i N i 0 {
            f = Math.max(digits(i), digits(N / i));
            ans = Math.min(ans, f);
            } f = Math.max(digits(i), digits(N / i)) f Math.max(digits(i), digits(N / i)) Math.max Math digits(i) digits i digits(N / i) digits N / i N i ans = Math.min(ans, f) ans Math.min(ans, f) Math.min Math ans f System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main{
    static long digits(long n){
        long res = 0;
        while(n > 0){
            res++;
            n /= 10; 
        }
        return res;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();

        long f = 0;
        long ans = Long.MAX_VALUE;
        for(long i = 1; i*i <= N; i++){
            if(N % i == 0){
            f = Math.max(digits(i), digits(N / i));
            ans = Math.min(ans, f);
            }
        }
        System.out.println(ans);
    }
}