import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long upper = (long) Math.floor(Math.sqrt(N))+1L;
        long ans = helper(N);
        for(long i=upper;i>0;i--){
            if(N%i==0){
                ans = Math.max(helper(N/i),helper(i));
                break;
            }
        }
        System.out.println(ans);
    }
    static long helper(long n){
        if(n==0) return 0;
        long cnt = 0;
        while(n>0){
            cnt++;
            n = n/10;
        }
        return cnt;
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long upper = (long) Math.floor(Math.sqrt(N))+1L;
        long ans = helper(N);
        for(long i=upper;i>0;i--){
            if(N%i==0){
                ans = Math.max(helper(N/i),helper(i));
                break;
            }
        }
        System.out.println(ans);
    }
    static long helper(long n){
        if(n==0) return 0;
        long cnt = 0;
        while(n>0){
            cnt++;
            n = n/10;
        }
        return cnt;
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long upper = (long) Math.floor(Math.sqrt(N))+1L;
        long ans = helper(N);
        for(long i=upper;i>0;i--){
            if(N%i==0){
                ans = Math.max(helper(N/i),helper(i));
                break;
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long upper = (long) Math.floor(Math.sqrt(N))+1L;
        long ans = helper(N);
        for(long i=upper;i>0;i--){
            if(N%i==0){
                ans = Math.max(helper(N/i),helper(i));
                break;
            }
        }
        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 upper = (long) Math.floor(Math.sqrt(N))+1L; upper (long) Math.floor(Math.sqrt(N))+1L (long) Math.floor(Math.sqrt(N)) Math.floor Math Math.sqrt(N) Math.sqrt Math N 1L long ans = helper(N); ans helper(N) helper N for(long i=upper;i>0;i--){
            if(N%i==0){
                ans = Math.max(helper(N/i),helper(i));
                break;
            }
        } long i=upper; long i=upper; i upper i>0 i 0 i-- i-- i {
            if(N%i==0){
                ans = Math.max(helper(N/i),helper(i));
                break;
            }
        } {
            if(N%i==0){
                ans = Math.max(helper(N/i),helper(i));
                break;
            }
        } if(N%i==0){
                ans = Math.max(helper(N/i),helper(i));
                break;
            } N%i==0 N%i N i 0 {
                ans = Math.max(helper(N/i),helper(i));
                break;
            } ans = Math.max(helper(N/i),helper(i)) ans Math.max(helper(N/i),helper(i)) Math.max Math helper(N/i) helper N/i N i helper(i) helper i break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args static long helper(long n){
        if(n==0) return 0;
        long cnt = 0;
        while(n>0){
            cnt++;
            n = n/10;
        }
        return cnt;
    } helper {
        if(n==0) return 0;
        long cnt = 0;
        while(n>0){
            cnt++;
            n = n/10;
        }
        return cnt;
    } if(n==0) return 0; n==0 n 0 return 0; 0 long cnt = 0; cnt 0 while(n>0){
            cnt++;
            n = n/10;
        } n>0 n 0 {
            cnt++;
            n = n/10;
        } cnt++ cnt n = n/10 n n/10 n 10 return cnt; cnt long n n
import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long upper = (long) Math.floor(Math.sqrt(N))+1L;
        long ans = helper(N);
        for(long i=upper;i>0;i--){
            if(N%i==0){
                ans = Math.max(helper(N/i),helper(i));
                break;
            }
        }
        System.out.println(ans);
    }
    static long helper(long n){
        if(n==0) return 0;
        long cnt = 0;
        while(n>0){
            cnt++;
            n = n/10;
        }
        return cnt;
    }
}
