
import java.util.Scanner;

public class Main {

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

        long n = sc.nextLong();
        long ans = 1L << 60;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    }
} 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();
        long ans = 1L << 60;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long n = sc.nextLong();
        long ans = 1L << 60;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);

        long n = sc.nextLong();
        long ans = 1L << 60;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            }
        }

        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 long ans = 1L << 60; ans 1L << 60 1L 60 for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            }
        } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
            if (n % i == 0) {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            }
        } {
            if (n % i == 0) {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            }
        } if (n % i == 0) {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            } n % i == 0 n % i n i 0 {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            } int f = Math.max(("" + i).length(), ("" + (n / i)).length()); f Math.max(("" + i).length(), ("" + (n / i)).length()) Math.max Math ("" + i).length() ("" + i).length ("" + i) "" i ("" + (n / i)).length() ("" + (n / i)).length ("" + (n / i)) "" (n / i) n i ans = Math.min(ans, f) ans Math.min(ans, f) Math.min Math ans f 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();
        long ans = 1L << 60;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    }
} public class Main {

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

        long n = sc.nextLong();
        long ans = 1L << 60;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    }
} Main

import java.util.Scanner;

public class Main {

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

        long n = sc.nextLong();
        long ans = 1L << 60;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                int f = Math.max(("" + i).length(), ("" + (n / i)).length());
                ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    }
}
