import java.util.*;
import static java.lang.System.*;

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

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