import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author silviase
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CDigitsInMultiplication solver = new CDigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    }

    static class CDigitsInMultiplication {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            int min = 100;
            for (long i = 1; i < Math.sqrt(n) + 1; i++) {
                if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                }
            }
            out.println(min);
        }

        int f(long a, long b) {
            return Math.max(Long.toString(a).length(), Long.toString(b).length());
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CDigitsInMultiplication solver = new CDigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    }

    static class CDigitsInMultiplication {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            int min = 100;
            for (long i = 1; i < Math.sqrt(n) + 1; i++) {
                if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                }
            }
            out.println(min);
        }

        int f(long a, long b) {
            return Math.max(Long.toString(a).length(), Long.toString(b).length());
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CDigitsInMultiplication solver = new CDigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CDigitsInMultiplication solver = new CDigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) CDigitsInMultiplication solver = new CDigitsInMultiplication(); solver new CDigitsInMultiplication() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class CDigitsInMultiplication {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            int min = 100;
            for (long i = 1; i < Math.sqrt(n) + 1; i++) {
                if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                }
            }
            out.println(min);
        }

        int f(long a, long b) {
            return Math.max(Long.toString(a).length(), Long.toString(b).length());
        }

    } CDigitsInMultiplication public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            int min = 100;
            for (long i = 1; i < Math.sqrt(n) + 1; i++) {
                if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                }
            }
            out.println(min);
        } solve {
            long n = in.nextLong();
            int min = 100;
            for (long i = 1; i < Math.sqrt(n) + 1; i++) {
                if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                }
            }
            out.println(min);
        } long n = in.nextLong(); n in.nextLong() in.nextLong in int min = 100; min 100 for (long i = 1; i < Math.sqrt(n) + 1; i++) {
                if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                }
            } long i = 1; long i = 1; i 1 i < Math.sqrt(n) + 1 i Math.sqrt(n) + 1 Math.sqrt(n) Math.sqrt Math n 1 i++ i++ i {
                if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                }
            } {
                if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                }
            } if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                } n % i == 0 n % i n i 0 {
                    min = Math.min(min, f(i, n / i));
                } min = Math.min(min, f(i, n / i)) min Math.min(min, f(i, n / i)) Math.min Math min f(i, n / i) f i n / i n i out.println(min) out.println out min int testNumber testNumber Scanner in in PrintWriter out out int f(long a, long b) {
            return Math.max(Long.toString(a).length(), Long.toString(b).length());
        } f {
            return Math.max(Long.toString(a).length(), Long.toString(b).length());
        } return Math.max(Long.toString(a).length(), Long.toString(b).length()); Math.max(Long.toString(a).length(), Long.toString(b).length()) Math.max Math Long.toString(a).length() Long.toString(a).length Long.toString(a) Long.toString Long a Long.toString(b).length() Long.toString(b).length Long.toString(b) Long.toString Long b long a a long b b public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CDigitsInMultiplication solver = new CDigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    }

    static class CDigitsInMultiplication {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            int min = 100;
            for (long i = 1; i < Math.sqrt(n) + 1; i++) {
                if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                }
            }
            out.println(min);
        }

        int f(long a, long b) {
            return Math.max(Long.toString(a).length(), Long.toString(b).length());
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CDigitsInMultiplication solver = new CDigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    }

    static class CDigitsInMultiplication {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            int min = 100;
            for (long i = 1; i < Math.sqrt(n) + 1; i++) {
                if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                }
            }
            out.println(min);
        }

        int f(long a, long b) {
            return Math.max(Long.toString(a).length(), Long.toString(b).length());
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author silviase
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CDigitsInMultiplication solver = new CDigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    }

    static class CDigitsInMultiplication {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            int min = 100;
            for (long i = 1; i < Math.sqrt(n) + 1; i++) {
                if (n % i == 0) {
                    min = Math.min(min, f(i, n / i));
                }
            }
            out.println(min);
        }

        int f(long a, long b) {
            return Math.max(Long.toString(a).length(), Long.toString(b).length());
        }

    }
}

