import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        
        long a = 1;
        
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            }
        }
        int cntA = 0;
        long A = a;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        
        int cntN = 0;
        long N = n/a;
        while(N > 0) {
            cntN++;
            N /= 10;
        }
		System.out.println(Math.max(cntN, cntA));
    }
    
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        
        long a = 1;
        
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            }
        }
        int cntA = 0;
        long A = a;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        
        int cntN = 0;
        long N = n/a;
        while(N > 0) {
            cntN++;
            N /= 10;
        }
		System.out.println(Math.max(cntN, cntA));
    }
    
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        
        long a = 1;
        
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            }
        }
        int cntA = 0;
        long A = a;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        
        int cntN = 0;
        long N = n/a;
        while(N > 0) {
            cntN++;
            N /= 10;
        }
		System.out.println(Math.max(cntN, cntA));
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        
        long a = 1;
        
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            }
        }
        int cntA = 0;
        long A = a;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        
        int cntN = 0;
        long N = n/a;
        while(N > 0) {
            cntN++;
            N /= 10;
        }
		System.out.println(Math.max(cntN, cntA));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long a = 1; a 1 for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            }
        } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
            if(n % i == 0) {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            }
        } {
            if(n % i == 0) {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            }
        } if(n % i == 0) {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            } n % i == 0 n % i n i 0 {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            } if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i; Math.abs(i - n/i) < Math.abs(a - n/a) Math.abs(i - n/i) Math.abs Math i - n/i i n/i n i Math.abs(a - n/a) Math.abs Math a - n/a a n/a n a a = i a i int cntA = 0; cntA 0 long A = a; A a while(A > 0) {
            cntA++;
            A /= 10;
        } A > 0 A 0 {
            cntA++;
            A /= 10;
        } cntA++ cntA A /= 10 A 10 int cntN = 0; cntN 0 long N = n/a; N n/a n a while(N > 0) {
            cntN++;
            N /= 10;
        } N > 0 N 0 {
            cntN++;
            N /= 10;
        } cntN++ cntN N /= 10 N 10 System.out.println(Math.max(cntN, cntA)) System.out.println System.out System System.out Math.max(cntN, cntA) Math.max Math cntN cntA String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        
        long a = 1;
        
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            }
        }
        int cntA = 0;
        long A = a;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        
        int cntN = 0;
        long N = n/a;
        while(N > 0) {
            cntN++;
            N /= 10;
        }
		System.out.println(Math.max(cntN, cntA));
    }
    
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        
        long a = 1;
        
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            }
        }
        int cntA = 0;
        long A = a;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        
        int cntN = 0;
        long N = n/a;
        while(N > 0) {
            cntN++;
            N /= 10;
        }
		System.out.println(Math.max(cntN, cntA));
    }
    
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        
        long a = 1;
        
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                if(Math.abs(i - n/i) < Math.abs(a - n/a))
                    a = i;
            }
        }
        int cntA = 0;
        long A = a;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        
        int cntN = 0;
        long N = n/a;
        while(N > 0) {
            cntN++;
            N /= 10;
        }
		System.out.println(Math.max(cntN, cntA));
    }
    
}
