import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long digits = Long.MAX_VALUE;
        double sqrt = Math.sqrt(n);
        for (long i = 1; i <= sqrt; i++) {
            if (n % i == 0) {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            }
        }

        System.out.print(digits);
    }

    static long f(long a, long b) {
        return Math.max(Long.toString(a).length(), Long.toString(b).length());
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long digits = Long.MAX_VALUE;
        double sqrt = Math.sqrt(n);
        for (long i = 1; i <= sqrt; i++) {
            if (n % i == 0) {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            }
        }

        System.out.print(digits);
    }

    static long f(long a, long b) {
        return Math.max(Long.toString(a).length(), Long.toString(b).length());
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long digits = Long.MAX_VALUE;
        double sqrt = Math.sqrt(n);
        for (long i = 1; i <= sqrt; i++) {
            if (n % i == 0) {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            }
        }

        System.out.print(digits);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long digits = Long.MAX_VALUE;
        double sqrt = Math.sqrt(n);
        for (long i = 1; i <= sqrt; i++) {
            if (n % i == 0) {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            }
        }

        System.out.print(digits);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long digits = Long.MAX_VALUE; digits Long.MAX_VALUE Long Long.MAX_VALUE double sqrt = Math.sqrt(n); sqrt Math.sqrt(n) Math.sqrt Math n for (long i = 1; i <= sqrt; i++) {
            if (n % i == 0) {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            }
        } long i = 1; long i = 1; i 1 i <= sqrt i sqrt i++ i++ i {
            if (n % i == 0) {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            }
        } {
            if (n % i == 0) {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            }
        } if (n % i == 0) {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            } n % i == 0 n % i n i 0 {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            } long a = n / i; a n / i n i digits = Math.min(digits, f(a, i)) digits Math.min(digits, f(a, i)) Math.min Math digits f(a, i) f a i System.out.print(digits) System.out.print System.out System System.out digits String[] args args static long f(long a, long b) {
        return Math.max(Long.toString(a).length(), Long.toString(b).length());
    } f {
        return Math.max(Long.toString(a).length(), Long.toString(b).length());
    } return Math.max(Long.toString(a).length(), Long.toString(b).length()); Math.max(Long.toString(a).length(), Long.toString(b).length()) Math.max Math Long.toString(a).length() Long.toString(a).length Long.toString(a) Long.toString Long a Long.toString(b).length() Long.toString(b).length Long.toString(b) Long.toString Long b long a a long b b public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long digits = Long.MAX_VALUE;
        double sqrt = Math.sqrt(n);
        for (long i = 1; i <= sqrt; i++) {
            if (n % i == 0) {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            }
        }

        System.out.print(digits);
    }

    static long f(long a, long b) {
        return Math.max(Long.toString(a).length(), Long.toString(b).length());
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long digits = Long.MAX_VALUE;
        double sqrt = Math.sqrt(n);
        for (long i = 1; i <= sqrt; i++) {
            if (n % i == 0) {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            }
        }

        System.out.print(digits);
    }

    static long f(long a, long b) {
        return Math.max(Long.toString(a).length(), Long.toString(b).length());
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long digits = Long.MAX_VALUE;
        double sqrt = Math.sqrt(n);
        for (long i = 1; i <= sqrt; i++) {
            if (n % i == 0) {
                long a = n / i;
                digits = Math.min(digits, f(a, i));
            }
        }

        System.out.print(digits);
    }

    static long f(long a, long b) {
        return Math.max(Long.toString(a).length(), Long.toString(b).length());
    }
}