import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        long r = Long.MAX_VALUE;
        for (long a = 1; a*a <= N; a++) {
            if (N % a == 0) {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            }
        }
        System.out.println(r);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        long r = Long.MAX_VALUE;
        for (long a = 1; a*a <= N; a++) {
            if (N % a == 0) {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            }
        }
        System.out.println(r);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        long r = Long.MAX_VALUE;
        for (long a = 1; a*a <= N; a++) {
            if (N % a == 0) {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            }
        }
        System.out.println(r);
    } main {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        long r = Long.MAX_VALUE;
        for (long a = 1; a*a <= N; a++) {
            if (N % a == 0) {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            }
        }
        System.out.println(r);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = Long.parseLong(sc.next()); N Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long r = Long.MAX_VALUE; r Long.MAX_VALUE Long Long.MAX_VALUE for (long a = 1; a*a <= N; a++) {
            if (N % a == 0) {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            }
        } long a = 1; long a = 1; a 1 a*a <= N a*a a a N a++ a++ a {
            if (N % a == 0) {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            }
        } {
            if (N % a == 0) {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            }
        } if (N % a == 0) {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            } N % a == 0 N % a N a 0 {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            } long b = N / a; b N / a N a long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length()); m Math.max(String.valueOf(a).length(), String.valueOf(b).length()) Math.max Math String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b r = Math.min(r,m) r Math.min(r,m) Math.min Math r m System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        long r = Long.MAX_VALUE;
        for (long a = 1; a*a <= N; a++) {
            if (N % a == 0) {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            }
        }
        System.out.println(r);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        long r = Long.MAX_VALUE;
        for (long a = 1; a*a <= N; a++) {
            if (N % a == 0) {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            }
        }
        System.out.println(r);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        long r = Long.MAX_VALUE;
        for (long a = 1; a*a <= N; a++) {
            if (N % a == 0) {
                long b = N / a;
                long m = Math.max(String.valueOf(a).length(), String.valueOf(b).length());
                r = Math.min(r,m);
            }
        }
        System.out.println(r);
    }
}