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 = 2; i * i <= n; i++) {
            if(n % i != 0) continue;
                
            if(Math.abs(i - n/i) < Math.abs(a - n/a))
                a = i;
        }
		System.out.println(Math.max(count(n/a), count(a)));
    }
    
    private static int count(long A) {
        int cntA = 0;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        return 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 = 2; i * i <= n; i++) {
            if(n % i != 0) continue;
                
            if(Math.abs(i - n/i) < Math.abs(a - n/a))
                a = i;
        }
		System.out.println(Math.max(count(n/a), count(a)));
    }
    
    private static int count(long A) {
        int cntA = 0;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        return 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 = 2; i * i <= n; i++) {
            if(n % i != 0) continue;
                
            if(Math.abs(i - n/i) < Math.abs(a - n/a))
                a = i;
        }
		System.out.println(Math.max(count(n/a), count(a)));
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        
        long a = 1;
        for(long i = 2; i * i <= n; i++) {
            if(n % i != 0) continue;
                
            if(Math.abs(i - n/i) < Math.abs(a - n/a))
                a = i;
        }
		System.out.println(Math.max(count(n/a), count(a)));
    } 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 = 2; i * i <= n; i++) {
            if(n % i != 0) continue;
                
            if(Math.abs(i - n/i) < Math.abs(a - n/a))
                a = i;
        } long i = 2; long i = 2; i 2 i * i <= n i * i i i n i++ i++ i {
            if(n % i != 0) continue;
                
            if(Math.abs(i - n/i) < Math.abs(a - n/a))
                a = i;
        } {
            if(n % i != 0) continue;
                
            if(Math.abs(i - n/i) < Math.abs(a - n/a))
                a = i;
        } if(n % i != 0) continue; n % i != 0 n % i n i 0 continue; 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 System.out.println(Math.max(count(n/a), count(a))) System.out.println System.out System System.out Math.max(count(n/a), count(a)) Math.max Math count(n/a) count n/a n a count(a) count a String[] args args private static int count(long A) {
        int cntA = 0;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        return cntA;
    } count {
        int cntA = 0;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        return cntA;
    } int cntA = 0; cntA 0 while(A > 0) {
            cntA++;
            A /= 10;
        } A > 0 A 0 {
            cntA++;
            A /= 10;
        } cntA++ cntA A /= 10 A 10 return cntA; cntA long A A 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 = 2; i * i <= n; i++) {
            if(n % i != 0) continue;
                
            if(Math.abs(i - n/i) < Math.abs(a - n/a))
                a = i;
        }
		System.out.println(Math.max(count(n/a), count(a)));
    }
    
    private static int count(long A) {
        int cntA = 0;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        return 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 = 2; i * i <= n; i++) {
            if(n % i != 0) continue;
                
            if(Math.abs(i - n/i) < Math.abs(a - n/a))
                a = i;
        }
		System.out.println(Math.max(count(n/a), count(a)));
    }
    
    private static int count(long A) {
        int cntA = 0;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        return 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 = 2; i * i <= n; i++) {
            if(n % i != 0) continue;
                
            if(Math.abs(i - n/i) < Math.abs(a - n/a))
                a = i;
        }
		System.out.println(Math.max(count(n/a), count(a)));
    }
    
    private static int count(long A) {
        int cntA = 0;
        while(A > 0) {
            cntA++;
            A /= 10;
        }
        return cntA;
    }
}
