import java.util.*;
 
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
 
        long N = sc.nextLong();
        long A;
        long B;
        long max = 0;

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

        if(N==1){
            System.out.println(1);
            return;
        }
        for(long i=1; i<=N; i++){
            A = i;
            B = N / A;
            if(A>B){
                System.out.println(String.valueOf(max).length());
                break;
            }
            else{
                if(N%A==0){
                    max = 0;
                    max = Math.max(A, B);
                }
            }
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
 
        long N = sc.nextLong();
        long A;
        long B;
        long max = 0;

        if(N==1){
            System.out.println(1);
            return;
        }
        for(long i=1; i<=N; i++){
            A = i;
            B = N / A;
            if(A>B){
                System.out.println(String.valueOf(max).length());
                break;
            }
            else{
                if(N%A==0){
                    max = 0;
                    max = Math.max(A, B);
                }
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
 
        long N = sc.nextLong();
        long A;
        long B;
        long max = 0;

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

        if(N==1){
            System.out.println(1);
            return;
        }
        for(long i=1; i<=N; i++){
            A = i;
            B = N / A;
            if(A>B){
                System.out.println(String.valueOf(max).length());
                break;
            }
            else{
                if(N%A==0){
                    max = 0;
                    max = Math.max(A, B);
                }
            }
        }
    }
}