import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long rootn = (long)Math.sqrt(n);
        
        String a = "";
        String b = "";
        for (long i = rootn; i >= 1; i--) {
            if (n % i == 0) {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            }
        }
        
        int answer = Math.max(a.length(), b.length());
        System.out.println(answer);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long rootn = (long)Math.sqrt(n);
        
        String a = "";
        String b = "";
        for (long i = rootn; i >= 1; i--) {
            if (n % i == 0) {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            }
        }
        
        int answer = Math.max(a.length(), b.length());
        System.out.println(answer);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long rootn = (long)Math.sqrt(n);
        
        String a = "";
        String b = "";
        for (long i = rootn; i >= 1; i--) {
            if (n % i == 0) {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            }
        }
        
        int answer = Math.max(a.length(), b.length());
        System.out.println(answer);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long rootn = (long)Math.sqrt(n);
        
        String a = "";
        String b = "";
        for (long i = rootn; i >= 1; i--) {
            if (n % i == 0) {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            }
        }
        
        int answer = Math.max(a.length(), b.length());
        System.out.println(answer);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long rootn = (long)Math.sqrt(n); rootn (long)Math.sqrt(n) Math.sqrt Math n String a = ""; a "" String b = ""; b "" for (long i = rootn; i >= 1; i--) {
            if (n % i == 0) {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            }
        } long i = rootn; long i = rootn; i rootn i >= 1 i 1 i-- i-- i {
            if (n % i == 0) {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            }
        } {
            if (n % i == 0) {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            }
        } if (n % i == 0) {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            } n % i == 0 n % i n i 0 {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            } a = String.valueOf(i) a String.valueOf(i) String.valueOf String i b = String.valueOf(n / i) b String.valueOf(n / i) String.valueOf String n / i n i break; int answer = Math.max(a.length(), b.length()); answer Math.max(a.length(), b.length()) Math.max Math a.length() a.length a b.length() b.length b System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long rootn = (long)Math.sqrt(n);
        
        String a = "";
        String b = "";
        for (long i = rootn; i >= 1; i--) {
            if (n % i == 0) {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            }
        }
        
        int answer = Math.max(a.length(), b.length());
        System.out.println(answer);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long rootn = (long)Math.sqrt(n);
        
        String a = "";
        String b = "";
        for (long i = rootn; i >= 1; i--) {
            if (n % i == 0) {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            }
        }
        
        int answer = Math.max(a.length(), b.length());
        System.out.println(answer);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long rootn = (long)Math.sqrt(n);
        
        String a = "";
        String b = "";
        for (long i = rootn; i >= 1; i--) {
            if (n % i == 0) {
                a = String.valueOf(i);
                b = String.valueOf(n / i);
                break;
            }
        }
        
        int answer = Math.max(a.length(), b.length());
        System.out.println(answer);
    }
}
