import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double N = scanner.nextDouble();
        int ceil = (int)Math.ceil(Math.sqrt(N));
        int min = Integer.MAX_VALUE;
        for (int i = 1; i < Math.max(2, ceil+1); i++) {
            if(N%i == 0){
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            }
        }

        System.out.println(min);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double N = scanner.nextDouble();
        int ceil = (int)Math.ceil(Math.sqrt(N));
        int min = Integer.MAX_VALUE;
        for (int i = 1; i < Math.max(2, ceil+1); i++) {
            if(N%i == 0){
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            }
        }

        System.out.println(min);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double N = scanner.nextDouble();
        int ceil = (int)Math.ceil(Math.sqrt(N));
        int min = Integer.MAX_VALUE;
        for (int i = 1; i < Math.max(2, ceil+1); i++) {
            if(N%i == 0){
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            }
        }

        System.out.println(min);
    } main {
        Scanner scanner = new Scanner(System.in);
        double N = scanner.nextDouble();
        int ceil = (int)Math.ceil(Math.sqrt(N));
        int min = Integer.MAX_VALUE;
        for (int i = 1; i < Math.max(2, ceil+1); i++) {
            if(N%i == 0){
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            }
        }

        System.out.println(min);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) double N = scanner.nextDouble(); N scanner.nextDouble() scanner.nextDouble scanner int ceil = (int)Math.ceil(Math.sqrt(N)); ceil (int)Math.ceil(Math.sqrt(N)) Math.ceil Math Math.sqrt(N) Math.sqrt Math N int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 1; i < Math.max(2, ceil+1); i++) {
            if(N%i == 0){
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            }
        } int i = 1; int i = 1; i 1 i < Math.max(2, ceil+1) i Math.max(2, ceil+1) Math.max Math 2 ceil+1 ceil 1 i++ i++ i {
            if(N%i == 0){
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            }
        } {
            if(N%i == 0){
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            }
        } if(N%i == 0){
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            } N%i == 0 N%i N i 0 {
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            } int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length()); f Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length()) Math.max Math String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i String.format("%.0f", N/i).length() String.format("%.0f", N/i).length String.format("%.0f", N/i) String.format String "%.0f" N/i N i min = Math.min(f, min) min Math.min(f, min) Math.min Math f min System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double N = scanner.nextDouble();
        int ceil = (int)Math.ceil(Math.sqrt(N));
        int min = Integer.MAX_VALUE;
        for (int i = 1; i < Math.max(2, ceil+1); i++) {
            if(N%i == 0){
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            }
        }

        System.out.println(min);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double N = scanner.nextDouble();
        int ceil = (int)Math.ceil(Math.sqrt(N));
        int min = Integer.MAX_VALUE;
        for (int i = 1; i < Math.max(2, ceil+1); i++) {
            if(N%i == 0){
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            }
        }

        System.out.println(min);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double N = scanner.nextDouble();
        int ceil = (int)Math.ceil(Math.sqrt(N));
        int min = Integer.MAX_VALUE;
        for (int i = 1; i < Math.max(2, ceil+1); i++) {
            if(N%i == 0){
                int f = Math.max(String.valueOf(i).length(), String.format("%.0f", N/i).length());
                min = Math.min(f, min);
            }
        }

        System.out.println(min);
    }
}
