import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int m = (int)Math.sqrt(N);
        int ans = 100;
        for(int i = m;i > 0;i--){
            if(N%i == 0){
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                break;
            }
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int m = (int)Math.sqrt(N);
        int ans = 100;
        for(int i = m;i > 0;i--){
            if(N%i == 0){
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                break;
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int m = (int)Math.sqrt(N);
        int ans = 100;
        for(int i = m;i > 0;i--){
            if(N%i == 0){
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                break;
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int m = (int)Math.sqrt(N);
        int ans = 100;
        for(int i = m;i > 0;i--){
            if(N%i == 0){
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                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 int m = (int)Math.sqrt(N); m (int)Math.sqrt(N) Math.sqrt Math N int ans = 100; ans 100 for(int i = m;i > 0;i--){
            if(N%i == 0){
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                break;
            }
        } int i = m; int i = m; i m i > 0 i 0 i-- i-- i {
            if(N%i == 0){
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                break;
            }
        } {
            if(N%i == 0){
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                break;
            }
        } if(N%i == 0){
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                break;
            } N%i == 0 N%i N i 0 {
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                break;
            } long A = i; A i long B = N/i; B N/i N i int count = 0; count 0 while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                } A > 0 || B > 0 A > 0 A 0 B > 0 B 0 {
                    A /= 10;
                    B /= 10;
                    count++;
                } A /= 10 A 10 B /= 10 B 10 count++ count ans = Math.min(ans, count) ans Math.min(ans, count) Math.min Math ans count break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int m = (int)Math.sqrt(N);
        int ans = 100;
        for(int i = m;i > 0;i--){
            if(N%i == 0){
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                break;
            }
        }
        System.out.println(ans);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int m = (int)Math.sqrt(N);
        int ans = 100;
        for(int i = m;i > 0;i--){
            if(N%i == 0){
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                break;
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int m = (int)Math.sqrt(N);
        int ans = 100;
        for(int i = m;i > 0;i--){
            if(N%i == 0){
                long A = i;
                long B = N/i;
                int count = 0;
                while(A > 0 || B > 0){
                    A /= 10;
                    B /= 10;
                    count++;
                }
                ans = Math.min(ans, count);
                break;
            }
        }
        System.out.println(ans);
    }
}