import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 10;
        long B = 1;
        for(long A = 1;A * A <= N;A++){
            if(N % A == 0){
                B = N / A;
            }
            if(digits(B) < min){
                min = digits(B);
            }
        }
        System.out.println(min);
    }
    public static int digits(long max){
        int count = 0;
        while(max != 0){
            max /= 10;
            count++;
        }
        return count;
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 10;
        long B = 1;
        for(long A = 1;A * A <= N;A++){
            if(N % A == 0){
                B = N / A;
            }
            if(digits(B) < min){
                min = digits(B);
            }
        }
        System.out.println(min);
    }
    public static int digits(long max){
        int count = 0;
        while(max != 0){
            max /= 10;
            count++;
        }
        return count;
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 10;
        long B = 1;
        for(long A = 1;A * A <= N;A++){
            if(N % A == 0){
                B = N / A;
            }
            if(digits(B) < min){
                min = digits(B);
            }
        }
        System.out.println(min);
    } main {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 10;
        long B = 1;
        for(long A = 1;A * A <= N;A++){
            if(N % A == 0){
                B = N / A;
            }
            if(digits(B) < min){
                min = digits(B);
            }
        }
        System.out.println(min);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int min = 10; min 10 long B = 1; B 1 for(long A = 1;A * A <= N;A++){
            if(N % A == 0){
                B = N / A;
            }
            if(digits(B) < min){
                min = digits(B);
            }
        } long A = 1; long A = 1; A 1 A * A <= N A * A A A N A++ A++ A {
            if(N % A == 0){
                B = N / A;
            }
            if(digits(B) < min){
                min = digits(B);
            }
        } {
            if(N % A == 0){
                B = N / A;
            }
            if(digits(B) < min){
                min = digits(B);
            }
        } if(N % A == 0){
                B = N / A;
            } N % A == 0 N % A N A 0 {
                B = N / A;
            } B = N / A B N / A N A if(digits(B) < min){
                min = digits(B);
            } digits(B) < min digits(B) digits B min {
                min = digits(B);
            } min = digits(B) min digits(B) digits B System.out.println(min) System.out.println System.out System System.out min String[] args args public static int digits(long max){
        int count = 0;
        while(max != 0){
            max /= 10;
            count++;
        }
        return count;
    } digits {
        int count = 0;
        while(max != 0){
            max /= 10;
            count++;
        }
        return count;
    } int count = 0; count 0 while(max != 0){
            max /= 10;
            count++;
        } max != 0 max 0 {
            max /= 10;
            count++;
        } max /= 10 max 10 count++ count return count; count long max max public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 10;
        long B = 1;
        for(long A = 1;A * A <= N;A++){
            if(N % A == 0){
                B = N / A;
            }
            if(digits(B) < min){
                min = digits(B);
            }
        }
        System.out.println(min);
    }
    public static int digits(long max){
        int count = 0;
        while(max != 0){
            max /= 10;
            count++;
        }
        return count;
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 10;
        long B = 1;
        for(long A = 1;A * A <= N;A++){
            if(N % A == 0){
                B = N / A;
            }
            if(digits(B) < min){
                min = digits(B);
            }
        }
        System.out.println(min);
    }
    public static int digits(long max){
        int count = 0;
        while(max != 0){
            max /= 10;
            count++;
        }
        return count;
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 10;
        long B = 1;
        for(long A = 1;A * A <= N;A++){
            if(N % A == 0){
                B = N / A;
            }
            if(digits(B) < min){
                min = digits(B);
            }
        }
        System.out.println(min);
    }
    public static int digits(long max){
        int count = 0;
        while(max != 0){
            max /= 10;
            count++;
        }
        return count;
    }
}
