import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

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

    static class DigitsInMultiplication {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long n = in.nextLong();
            // double x = Math.sqrt(n);
            // long j = (long) Math.floor(x);
            long i = (long) Math.floor(Math.sqrt(n));
            while (n % i > 0) i--;
            long j = n / i;
            // out.println(i + " * " + j);
            out.println((long) Math.floor(Math.log10(j)) + 1);
        }

    }

    static class InputReader {
        private static BufferedReader in;
        private static StringTokenizer tok;

        public InputReader(InputStream in) {
            this.in = new BufferedReader(new InputStreamReader(in));
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String next() {
            try {
                while (tok == null || !tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                }
            } catch (IOException ex) {
                System.err.println("An IOException was caught :" + ex.getMessage());
            }
            return tok.nextToken();
        }

    }
}
 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.io.PrintStream; PrintStream java.io import java.util.StringTokenizer; StringTokenizer java.util import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.InputStream; InputStream java.io public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        DigitsInMultiplication solver = new DigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    }

    static class DigitsInMultiplication {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long n = in.nextLong();
            // double x = Math.sqrt(n);
            // long j = (long) Math.floor(x);
            long i = (long) Math.floor(Math.sqrt(n));
            while (n % i > 0) i--;
            long j = n / i;
            // out.println(i + " * " + j);
            out.println((long) Math.floor(Math.log10(j)) + 1);
        }

    }

    static class InputReader {
        private static BufferedReader in;
        private static StringTokenizer tok;

        public InputReader(InputStream in) {
            this.in = new BufferedReader(new InputStreamReader(in));
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String next() {
            try {
                while (tok == null || !tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                }
            } catch (IOException ex) {
                System.err.println("An IOException was caught :" + ex.getMessage());
            }
            return tok.nextToken();
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        DigitsInMultiplication solver = new DigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        DigitsInMultiplication solver = new DigitsInMultiplication();
        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 InputReader in = new InputReader(inputStream); in new InputReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) DigitsInMultiplication solver = new DigitsInMultiplication(); solver new DigitsInMultiplication() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class DigitsInMultiplication {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long n = in.nextLong();
            // double x = Math.sqrt(n);
            // long j = (long) Math.floor(x);
            long i = (long) Math.floor(Math.sqrt(n));
            while (n % i > 0) i--;
            long j = n / i;
            // out.println(i + " * " + j);
            out.println((long) Math.floor(Math.log10(j)) + 1);
        }

    } DigitsInMultiplication public void solve(int testNumber, InputReader in, PrintWriter out) {
            long n = in.nextLong();
            // double x = Math.sqrt(n);
            // long j = (long) Math.floor(x);
            long i = (long) Math.floor(Math.sqrt(n));
            while (n % i > 0) i--;
            long j = n / i;
            // out.println(i + " * " + j);
            out.println((long) Math.floor(Math.log10(j)) + 1);
        } solve {
            long n = in.nextLong();
            // double x = Math.sqrt(n);
            // long j = (long) Math.floor(x);
            long i = (long) Math.floor(Math.sqrt(n));
            while (n % i > 0) i--;
            long j = n / i;
            // out.println(i + " * " + j);
            out.println((long) Math.floor(Math.log10(j)) + 1);
        } long n = in.nextLong(); n in.nextLong() in.nextLong in long i = (long) Math.floor(Math.sqrt(n)); i (long) Math.floor(Math.sqrt(n)) Math.floor Math Math.sqrt(n) Math.sqrt Math n while (n % i > 0) i--; n % i > 0 n % i n i 0 i-- i long j = n / i; j n / i n i out.println((long) Math.floor(Math.log10(j)) + 1) out.println out (long) Math.floor(Math.log10(j)) + 1 (long) Math.floor(Math.log10(j)) Math.floor Math Math.log10(j) Math.log10 Math j 1 int testNumber testNumber InputReader in in PrintWriter out out static class InputReader {
        private static BufferedReader in;
        private static StringTokenizer tok;

        public InputReader(InputStream in) {
            this.in = new BufferedReader(new InputStreamReader(in));
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String next() {
            try {
                while (tok == null || !tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                }
            } catch (IOException ex) {
                System.err.println("An IOException was caught :" + ex.getMessage());
            }
            return tok.nextToken();
        }

    } InputReader private static BufferedReader in; in private static StringTokenizer tok; tok public InputReader(InputStream in) {
            this.in = new BufferedReader(new InputStreamReader(in));
        } InputReader {
            this.in = new BufferedReader(new InputStreamReader(in));
        } this.in = new BufferedReader(new InputStreamReader(in)) this.in this this.in new BufferedReader(new InputStreamReader(in)) InputStream in in public long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public String next() {
            try {
                while (tok == null || !tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                }
            } catch (IOException ex) {
                System.err.println("An IOException was caught :" + ex.getMessage());
            }
            return tok.nextToken();
        } next {
            try {
                while (tok == null || !tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                }
            } catch (IOException ex) {
                System.err.println("An IOException was caught :" + ex.getMessage());
            }
            return tok.nextToken();
        } try {
                while (tok == null || !tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                }
            } catch (IOException ex) {
                System.err.println("An IOException was caught :" + ex.getMessage());
            } catch (IOException ex) {
                System.err.println("An IOException was caught :" + ex.getMessage());
            } IOException ex {
                System.err.println("An IOException was caught :" + ex.getMessage());
            } System.err.println("An IOException was caught :" + ex.getMessage()) System.err.println System.err System System.err "An IOException was caught :" + ex.getMessage() "An IOException was caught :" ex.getMessage() ex.getMessage ex {
                while (tok == null || !tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                }
            } while (tok == null || !tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                } tok == null || !tok.hasMoreTokens() tok == null tok null !tok.hasMoreTokens() tok.hasMoreTokens() tok.hasMoreTokens tok {
                    tok = new StringTokenizer(in.readLine());
                } tok = new StringTokenizer(in.readLine()) tok new StringTokenizer(in.readLine()) return tok.nextToken(); tok.nextToken() tok.nextToken tok public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        DigitsInMultiplication solver = new DigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    }

    static class DigitsInMultiplication {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long n = in.nextLong();
            // double x = Math.sqrt(n);
            // long j = (long) Math.floor(x);
            long i = (long) Math.floor(Math.sqrt(n));
            while (n % i > 0) i--;
            long j = n / i;
            // out.println(i + " * " + j);
            out.println((long) Math.floor(Math.log10(j)) + 1);
        }

    }

    static class InputReader {
        private static BufferedReader in;
        private static StringTokenizer tok;

        public InputReader(InputStream in) {
            this.in = new BufferedReader(new InputStreamReader(in));
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String next() {
            try {
                while (tok == null || !tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                }
            } catch (IOException ex) {
                System.err.println("An IOException was caught :" + ex.getMessage());
            }
            return tok.nextToken();
        }

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

    static class DigitsInMultiplication {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long n = in.nextLong();
            // double x = Math.sqrt(n);
            // long j = (long) Math.floor(x);
            long i = (long) Math.floor(Math.sqrt(n));
            while (n % i > 0) i--;
            long j = n / i;
            // out.println(i + " * " + j);
            out.println((long) Math.floor(Math.log10(j)) + 1);
        }

    }

    static class InputReader {
        private static BufferedReader in;
        private static StringTokenizer tok;

        public InputReader(InputStream in) {
            this.in = new BufferedReader(new InputStreamReader(in));
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String next() {
            try {
                while (tok == null || !tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                }
            } catch (IOException ex) {
                System.err.println("An IOException was caught :" + ex.getMessage());
            }
            return tok.nextToken();
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

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

    static class DigitsInMultiplication {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long n = in.nextLong();
            // double x = Math.sqrt(n);
            // long j = (long) Math.floor(x);
            long i = (long) Math.floor(Math.sqrt(n));
            while (n % i > 0) i--;
            long j = n / i;
            // out.println(i + " * " + j);
            out.println((long) Math.floor(Math.log10(j)) + 1);
        }

    }

    static class InputReader {
        private static BufferedReader in;
        private static StringTokenizer tok;

        public InputReader(InputStream in) {
            this.in = new BufferedReader(new InputStreamReader(in));
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String next() {
            try {
                while (tok == null || !tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                }
            } catch (IOException ex) {
                System.err.println("An IOException was caught :" + ex.getMessage());
            }
            return tok.nextToken();
        }

    }
}

