import java.math.BigDecimal;
import java.util.*;

public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        long N = sc.nextLong();

        long ans = Long.MAX_VALUE;
        long rootN = (long)Math.sqrt(N);
        for (long i = 1; i <= rootN; i++) {
            long muti = N / i;
            if (N % i == 0) {
                ans = Math.min(ans, digit(muti));
            }
        }

        System.out.println(ans);
    }

    private static int digit(long n) {
        return String.valueOf(n).length();
    }
} import java.math.BigDecimal; BigDecimal java.math import java.util.*; util.* java public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        long N = sc.nextLong();

        long ans = Long.MAX_VALUE;
        long rootN = (long)Math.sqrt(N);
        for (long i = 1; i <= rootN; i++) {
            long muti = N / i;
            if (N % i == 0) {
                ans = Math.min(ans, digit(muti));
            }
        }

        System.out.println(ans);
    }

    private static int digit(long n) {
        return String.valueOf(n).length();
    }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        long N = sc.nextLong();

        long ans = Long.MAX_VALUE;
        long rootN = (long)Math.sqrt(N);
        for (long i = 1; i <= rootN; i++) {
            long muti = N / i;
            if (N % i == 0) {
                ans = Math.min(ans, digit(muti));
            }
        }

        System.out.println(ans);
    } main {
        long N = sc.nextLong();

        long ans = Long.MAX_VALUE;
        long rootN = (long)Math.sqrt(N);
        for (long i = 1; i <= rootN; i++) {
            long muti = N / i;
            if (N % i == 0) {
                ans = Math.min(ans, digit(muti));
            }
        }

        System.out.println(ans);
    } long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long ans = Long.MAX_VALUE; ans Long.MAX_VALUE Long Long.MAX_VALUE long rootN = (long)Math.sqrt(N); rootN (long)Math.sqrt(N) Math.sqrt Math N for (long i = 1; i <= rootN; i++) {
            long muti = N / i;
            if (N % i == 0) {
                ans = Math.min(ans, digit(muti));
            }
        } long i = 1; long i = 1; i 1 i <= rootN i rootN i++ i++ i {
            long muti = N / i;
            if (N % i == 0) {
                ans = Math.min(ans, digit(muti));
            }
        } {
            long muti = N / i;
            if (N % i == 0) {
                ans = Math.min(ans, digit(muti));
            }
        } long muti = N / i; muti N / i N i if (N % i == 0) {
                ans = Math.min(ans, digit(muti));
            } N % i == 0 N % i N i 0 {
                ans = Math.min(ans, digit(muti));
            } ans = Math.min(ans, digit(muti)) ans Math.min(ans, digit(muti)) Math.min Math ans digit(muti) digit muti System.out.println(ans) System.out.println System.out System System.out ans String[] args args private static int digit(long n) {
        return String.valueOf(n).length();
    } digit {
        return String.valueOf(n).length();
    } return String.valueOf(n).length(); String.valueOf(n).length() String.valueOf(n).length String.valueOf(n) String.valueOf String n long n n public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        long N = sc.nextLong();

        long ans = Long.MAX_VALUE;
        long rootN = (long)Math.sqrt(N);
        for (long i = 1; i <= rootN; i++) {
            long muti = N / i;
            if (N % i == 0) {
                ans = Math.min(ans, digit(muti));
            }
        }

        System.out.println(ans);
    }

    private static int digit(long n) {
        return String.valueOf(n).length();
    }
} public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        long N = sc.nextLong();

        long ans = Long.MAX_VALUE;
        long rootN = (long)Math.sqrt(N);
        for (long i = 1; i <= rootN; i++) {
            long muti = N / i;
            if (N % i == 0) {
                ans = Math.min(ans, digit(muti));
            }
        }

        System.out.println(ans);
    }

    private static int digit(long n) {
        return String.valueOf(n).length();
    }
} Main
import java.math.BigDecimal;
import java.util.*;

public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        long N = sc.nextLong();

        long ans = Long.MAX_VALUE;
        long rootN = (long)Math.sqrt(N);
        for (long i = 1; i <= rootN; i++) {
            long muti = N / i;
            if (N % i == 0) {
                ans = Math.min(ans, digit(muti));
            }
        }

        System.out.println(ans);
    }

    private static int digit(long n) {
        return String.valueOf(n).length();
    }
}