public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
	    long n = scanner.nextLong(), ans = String.valueOf(n).length();
	    for (long i = 1; i * i <= n; i++)
            if (n % i == 0)
                ans = Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
        System.out.println(ans);
    }
} public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
	    long n = scanner.nextLong(), ans = String.valueOf(n).length();
	    for (long i = 1; i * i <= n; i++)
            if (n % i == 0)
                ans = Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
        System.out.println(ans);
    }
} Main private static java.util.Scanner scanner = new java.util.Scanner(System.in); scanner new java.util.Scanner(System.in) public static void main(String[] args) {
	    long n = scanner.nextLong(), ans = String.valueOf(n).length();
	    for (long i = 1; i * i <= n; i++)
            if (n % i == 0)
                ans = Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
        System.out.println(ans);
    } main {
	    long n = scanner.nextLong(), ans = String.valueOf(n).length();
	    for (long i = 1; i * i <= n; i++)
            if (n % i == 0)
                ans = Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
        System.out.println(ans);
    } long n = scanner.nextLong() n scanner.nextLong() scanner.nextLong scanner ans = String.valueOf(n).length(); ans String.valueOf(n).length() String.valueOf(n).length String.valueOf(n) String.valueOf String n for (long i = 1; i * i <= n; i++)
            if (n % i == 0)
                ans = Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length())); long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i if (n % i == 0)
                ans = Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length())); if (n % i == 0)
                ans = Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length())); n % i == 0 n % i n i 0 ans = Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length())) ans Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length())) Math.min Math ans Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()) Math.max Math String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i String.valueOf(n / i).length() String.valueOf(n / i).length String.valueOf(n / i) String.valueOf String n / i n i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
	    long n = scanner.nextLong(), ans = String.valueOf(n).length();
	    for (long i = 1; i * i <= n; i++)
            if (n % i == 0)
                ans = Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
        System.out.println(ans);
    }
} public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
	    long n = scanner.nextLong(), ans = String.valueOf(n).length();
	    for (long i = 1; i * i <= n; i++)
            if (n % i == 0)
                ans = Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
        System.out.println(ans);
    }
} Main
public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
	    long n = scanner.nextLong(), ans = String.valueOf(n).length();
	    for (long i = 1; i * i <= n; i++)
            if (n % i == 0)
                ans = Math.min(ans, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
        System.out.println(ans);
    }
}