import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.nio.charset.Charset;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.BufferedReader;
import java.io.InputStream;

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

    static class CDigitsInMultiplication {
        public void solve(int testNumber, LightScanner in, LightWriter out) {
            // out.setBoolLabel(LightWriter.BoolLabel.YES_NO_FIRST_UP);
            long n = in.longs();
            int ans = 100;
            for (long i = 1; i * i <= n; i++) {
                if (n % i > 0) continue;
                long j = n / i;
                int c = 0;
                while (j > 0) {
                    j /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }
            out.ansln(ans);
        }

    }

    static class LightScanner {
        private BufferedReader reader = null;
        private StringTokenizer tokenizer = null;

        public LightScanner(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public String string() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long longs() {
            return Long.parseLong(string());
        }

    }

    static class LightWriter implements AutoCloseable {
        private final Writer out;
        private boolean autoflush = false;
        private boolean breaked = true;

        public LightWriter(Writer out) {
            this.out = out;
        }

        public LightWriter(OutputStream out) {
            this(new BufferedWriter(new OutputStreamWriter(out, Charset.defaultCharset())));
        }

        public LightWriter print(char c) {
            try {
                out.write(c);
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter print(String s) {
            try {
                out.write(s, 0, s.length());
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter ans(String s) {
            if (!breaked) {
                print(' ');
            }
            return print(s);
        }

        public LightWriter ans(int i) {
            return ans(Integer.toString(i));
        }

        public LightWriter ansln(int... n) {
            for (int n1 : n) {
                ans(n1).ln();
            }
            return this;
        }

        public LightWriter ln() {
            print(System.lineSeparator());
            breaked = true;
            if (autoflush) {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            }
            return this;
        }

        public void close() {
            try {
                out.close();
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.OutputStream; OutputStream java.io import java.io.BufferedWriter; BufferedWriter java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.UncheckedIOException; UncheckedIOException java.io import java.nio.charset.Charset; Charset java.nio.charset import java.util.StringTokenizer; StringTokenizer java.util import java.io.Writer; Writer java.io import java.io.OutputStreamWriter; OutputStreamWriter java.io import java.io.BufferedReader; BufferedReader 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;
        LightScanner in = new LightScanner(inputStream);
        LightWriter out = new LightWriter(outputStream);
        CDigitsInMultiplication solver = new CDigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    }

    static class CDigitsInMultiplication {
        public void solve(int testNumber, LightScanner in, LightWriter out) {
            // out.setBoolLabel(LightWriter.BoolLabel.YES_NO_FIRST_UP);
            long n = in.longs();
            int ans = 100;
            for (long i = 1; i * i <= n; i++) {
                if (n % i > 0) continue;
                long j = n / i;
                int c = 0;
                while (j > 0) {
                    j /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }
            out.ansln(ans);
        }

    }

    static class LightScanner {
        private BufferedReader reader = null;
        private StringTokenizer tokenizer = null;

        public LightScanner(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public String string() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long longs() {
            return Long.parseLong(string());
        }

    }

    static class LightWriter implements AutoCloseable {
        private final Writer out;
        private boolean autoflush = false;
        private boolean breaked = true;

        public LightWriter(Writer out) {
            this.out = out;
        }

        public LightWriter(OutputStream out) {
            this(new BufferedWriter(new OutputStreamWriter(out, Charset.defaultCharset())));
        }

        public LightWriter print(char c) {
            try {
                out.write(c);
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter print(String s) {
            try {
                out.write(s, 0, s.length());
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter ans(String s) {
            if (!breaked) {
                print(' ');
            }
            return print(s);
        }

        public LightWriter ans(int i) {
            return ans(Integer.toString(i));
        }

        public LightWriter ansln(int... n) {
            for (int n1 : n) {
                ans(n1).ln();
            }
            return this;
        }

        public LightWriter ln() {
            print(System.lineSeparator());
            breaked = true;
            if (autoflush) {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            }
            return this;
        }

        public void close() {
            try {
                out.close();
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        LightScanner in = new LightScanner(inputStream);
        LightWriter out = new LightWriter(outputStream);
        CDigitsInMultiplication solver = new CDigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        LightScanner in = new LightScanner(inputStream);
        LightWriter out = new LightWriter(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 LightScanner in = new LightScanner(inputStream); in new LightScanner(inputStream) LightWriter out = new LightWriter(outputStream); out new LightWriter(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, LightScanner in, LightWriter out) {
            // out.setBoolLabel(LightWriter.BoolLabel.YES_NO_FIRST_UP);
            long n = in.longs();
            int ans = 100;
            for (long i = 1; i * i <= n; i++) {
                if (n % i > 0) continue;
                long j = n / i;
                int c = 0;
                while (j > 0) {
                    j /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }
            out.ansln(ans);
        }

    } CDigitsInMultiplication public void solve(int testNumber, LightScanner in, LightWriter out) {
            // out.setBoolLabel(LightWriter.BoolLabel.YES_NO_FIRST_UP);
            long n = in.longs();
            int ans = 100;
            for (long i = 1; i * i <= n; i++) {
                if (n % i > 0) continue;
                long j = n / i;
                int c = 0;
                while (j > 0) {
                    j /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }
            out.ansln(ans);
        } solve {
            // out.setBoolLabel(LightWriter.BoolLabel.YES_NO_FIRST_UP);
            long n = in.longs();
            int ans = 100;
            for (long i = 1; i * i <= n; i++) {
                if (n % i > 0) continue;
                long j = n / i;
                int c = 0;
                while (j > 0) {
                    j /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }
            out.ansln(ans);
        } long n = in.longs(); n in.longs() in.longs in int ans = 100; ans 100 for (long i = 1; i * i <= n; i++) {
                if (n % i > 0) continue;
                long j = n / i;
                int c = 0;
                while (j > 0) {
                    j /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
                if (n % i > 0) continue;
                long j = n / i;
                int c = 0;
                while (j > 0) {
                    j /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            } {
                if (n % i > 0) continue;
                long j = n / i;
                int c = 0;
                while (j > 0) {
                    j /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            } if (n % i > 0) continue; n % i > 0 n % i n i 0 continue; long j = n / i; j n / i n i int c = 0; c 0 while (j > 0) {
                    j /= 10;
                    c++;
                } j > 0 j 0 {
                    j /= 10;
                    c++;
                } j /= 10 j 10 c++ c ans = Math.min(ans, c) ans Math.min(ans, c) Math.min Math ans c out.ansln(ans) out.ansln out ans int testNumber testNumber LightScanner in in LightWriter out out static class LightScanner {
        private BufferedReader reader = null;
        private StringTokenizer tokenizer = null;

        public LightScanner(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public String string() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long longs() {
            return Long.parseLong(string());
        }

    } LightScanner private BufferedReader reader = null; reader null private StringTokenizer tokenizer = null; tokenizer null public LightScanner(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        } LightScanner {
            reader = new BufferedReader(new InputStreamReader(in));
        } reader = new BufferedReader(new InputStreamReader(in)) reader new BufferedReader(new InputStreamReader(in)) InputStream in in public String string() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            }
            return tokenizer.nextToken();
        } string {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            }
            return tokenizer.nextToken();
        } if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            } try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                } IOException e {
                    throw new UncheckedIOException(e);
                } throw new UncheckedIOException(e); new UncheckedIOException(e) {
                    tokenizer = new StringTokenizer(reader.readLine());
                } tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public long longs() {
            return Long.parseLong(string());
        } longs {
            return Long.parseLong(string());
        } return Long.parseLong(string()); Long.parseLong(string()) Long.parseLong Long string() string static class LightWriter implements AutoCloseable {
        private final Writer out;
        private boolean autoflush = false;
        private boolean breaked = true;

        public LightWriter(Writer out) {
            this.out = out;
        }

        public LightWriter(OutputStream out) {
            this(new BufferedWriter(new OutputStreamWriter(out, Charset.defaultCharset())));
        }

        public LightWriter print(char c) {
            try {
                out.write(c);
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter print(String s) {
            try {
                out.write(s, 0, s.length());
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter ans(String s) {
            if (!breaked) {
                print(' ');
            }
            return print(s);
        }

        public LightWriter ans(int i) {
            return ans(Integer.toString(i));
        }

        public LightWriter ansln(int... n) {
            for (int n1 : n) {
                ans(n1).ln();
            }
            return this;
        }

        public LightWriter ln() {
            print(System.lineSeparator());
            breaked = true;
            if (autoflush) {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            }
            return this;
        }

        public void close() {
            try {
                out.close();
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        }

    } LightWriter private final Writer out; out private boolean autoflush = false; autoflush false private boolean breaked = true; breaked true public LightWriter(Writer out) {
            this.out = out;
        } LightWriter {
            this.out = out;
        } this.out = out this.out this this.out out Writer out out public LightWriter(OutputStream out) {
            this(new BufferedWriter(new OutputStreamWriter(out, Charset.defaultCharset())));
        } LightWriter {
            this(new BufferedWriter(new OutputStreamWriter(out, Charset.defaultCharset())));
        } this(new BufferedWriter(new OutputStreamWriter(out, Charset.defaultCharset()))) this new BufferedWriter(new OutputStreamWriter(out, Charset.defaultCharset())) OutputStream out out public LightWriter print(char c) {
            try {
                out.write(c);
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        } print {
            try {
                out.write(c);
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        } try {
                out.write(c);
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            } IOException ex {
                throw new UncheckedIOException(ex);
            } throw new UncheckedIOException(ex); new UncheckedIOException(ex) {
                out.write(c);
                breaked = false;
            } out.write(c) out.write out c breaked = false breaked false return this; this char c c public LightWriter print(String s) {
            try {
                out.write(s, 0, s.length());
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        } print {
            try {
                out.write(s, 0, s.length());
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        } try {
                out.write(s, 0, s.length());
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            } IOException ex {
                throw new UncheckedIOException(ex);
            } throw new UncheckedIOException(ex); new UncheckedIOException(ex) {
                out.write(s, 0, s.length());
                breaked = false;
            } out.write(s, 0, s.length()) out.write out s 0 s.length() s.length s breaked = false breaked false return this; this String s s public LightWriter ans(String s) {
            if (!breaked) {
                print(' ');
            }
            return print(s);
        } ans {
            if (!breaked) {
                print(' ');
            }
            return print(s);
        } if (!breaked) {
                print(' ');
            } !breaked breaked {
                print(' ');
            } print(' ') print ' ' return print(s); print(s) print s String s s public LightWriter ans(int i) {
            return ans(Integer.toString(i));
        } ans {
            return ans(Integer.toString(i));
        } return ans(Integer.toString(i)); ans(Integer.toString(i)) ans Integer.toString(i) Integer.toString Integer i int i i public LightWriter ansln(int... n) {
            for (int n1 : n) {
                ans(n1).ln();
            }
            return this;
        } ansln {
            for (int n1 : n) {
                ans(n1).ln();
            }
            return this;
        } for (int n1 : n) {
                ans(n1).ln();
            } int n1 n {
                ans(n1).ln();
            } {
                ans(n1).ln();
            } ans(n1).ln() ans(n1).ln ans(n1) ans n1 return this; this int... n n public LightWriter ln() {
            print(System.lineSeparator());
            breaked = true;
            if (autoflush) {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            }
            return this;
        } ln {
            print(System.lineSeparator());
            breaked = true;
            if (autoflush) {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            }
            return this;
        } print(System.lineSeparator()) print System.lineSeparator() System.lineSeparator System breaked = true breaked true if (autoflush) {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            } autoflush {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            } try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                } IOException ex {
                    throw new UncheckedIOException(ex);
                } throw new UncheckedIOException(ex); new UncheckedIOException(ex) {
                    out.flush();
                } out.flush() out.flush out return this; this public void close() {
            try {
                out.close();
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        } close {
            try {
                out.close();
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        } try {
                out.close();
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            } IOException ex {
                throw new UncheckedIOException(ex);
            } throw new UncheckedIOException(ex); new UncheckedIOException(ex) {
                out.close();
            } out.close() out.close out AutoCloseable public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        LightScanner in = new LightScanner(inputStream);
        LightWriter out = new LightWriter(outputStream);
        CDigitsInMultiplication solver = new CDigitsInMultiplication();
        solver.solve(1, in, out);
        out.close();
    }

    static class CDigitsInMultiplication {
        public void solve(int testNumber, LightScanner in, LightWriter out) {
            // out.setBoolLabel(LightWriter.BoolLabel.YES_NO_FIRST_UP);
            long n = in.longs();
            int ans = 100;
            for (long i = 1; i * i <= n; i++) {
                if (n % i > 0) continue;
                long j = n / i;
                int c = 0;
                while (j > 0) {
                    j /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }
            out.ansln(ans);
        }

    }

    static class LightScanner {
        private BufferedReader reader = null;
        private StringTokenizer tokenizer = null;

        public LightScanner(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public String string() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long longs() {
            return Long.parseLong(string());
        }

    }

    static class LightWriter implements AutoCloseable {
        private final Writer out;
        private boolean autoflush = false;
        private boolean breaked = true;

        public LightWriter(Writer out) {
            this.out = out;
        }

        public LightWriter(OutputStream out) {
            this(new BufferedWriter(new OutputStreamWriter(out, Charset.defaultCharset())));
        }

        public LightWriter print(char c) {
            try {
                out.write(c);
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter print(String s) {
            try {
                out.write(s, 0, s.length());
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter ans(String s) {
            if (!breaked) {
                print(' ');
            }
            return print(s);
        }

        public LightWriter ans(int i) {
            return ans(Integer.toString(i));
        }

        public LightWriter ansln(int... n) {
            for (int n1 : n) {
                ans(n1).ln();
            }
            return this;
        }

        public LightWriter ln() {
            print(System.lineSeparator());
            breaked = true;
            if (autoflush) {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            }
            return this;
        }

        public void close() {
            try {
                out.close();
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        }

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

    static class CDigitsInMultiplication {
        public void solve(int testNumber, LightScanner in, LightWriter out) {
            // out.setBoolLabel(LightWriter.BoolLabel.YES_NO_FIRST_UP);
            long n = in.longs();
            int ans = 100;
            for (long i = 1; i * i <= n; i++) {
                if (n % i > 0) continue;
                long j = n / i;
                int c = 0;
                while (j > 0) {
                    j /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }
            out.ansln(ans);
        }

    }

    static class LightScanner {
        private BufferedReader reader = null;
        private StringTokenizer tokenizer = null;

        public LightScanner(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public String string() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long longs() {
            return Long.parseLong(string());
        }

    }

    static class LightWriter implements AutoCloseable {
        private final Writer out;
        private boolean autoflush = false;
        private boolean breaked = true;

        public LightWriter(Writer out) {
            this.out = out;
        }

        public LightWriter(OutputStream out) {
            this(new BufferedWriter(new OutputStreamWriter(out, Charset.defaultCharset())));
        }

        public LightWriter print(char c) {
            try {
                out.write(c);
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter print(String s) {
            try {
                out.write(s, 0, s.length());
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter ans(String s) {
            if (!breaked) {
                print(' ');
            }
            return print(s);
        }

        public LightWriter ans(int i) {
            return ans(Integer.toString(i));
        }

        public LightWriter ansln(int... n) {
            for (int n1 : n) {
                ans(n1).ln();
            }
            return this;
        }

        public LightWriter ln() {
            print(System.lineSeparator());
            breaked = true;
            if (autoflush) {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            }
            return this;
        }

        public void close() {
            try {
                out.close();
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.nio.charset.Charset;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.BufferedReader;
import java.io.InputStream;

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

    static class CDigitsInMultiplication {
        public void solve(int testNumber, LightScanner in, LightWriter out) {
            // out.setBoolLabel(LightWriter.BoolLabel.YES_NO_FIRST_UP);
            long n = in.longs();
            int ans = 100;
            for (long i = 1; i * i <= n; i++) {
                if (n % i > 0) continue;
                long j = n / i;
                int c = 0;
                while (j > 0) {
                    j /= 10;
                    c++;
                }
                ans = Math.min(ans, c);
            }
            out.ansln(ans);
        }

    }

    static class LightScanner {
        private BufferedReader reader = null;
        private StringTokenizer tokenizer = null;

        public LightScanner(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public String string() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long longs() {
            return Long.parseLong(string());
        }

    }

    static class LightWriter implements AutoCloseable {
        private final Writer out;
        private boolean autoflush = false;
        private boolean breaked = true;

        public LightWriter(Writer out) {
            this.out = out;
        }

        public LightWriter(OutputStream out) {
            this(new BufferedWriter(new OutputStreamWriter(out, Charset.defaultCharset())));
        }

        public LightWriter print(char c) {
            try {
                out.write(c);
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter print(String s) {
            try {
                out.write(s, 0, s.length());
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter ans(String s) {
            if (!breaked) {
                print(' ');
            }
            return print(s);
        }

        public LightWriter ans(int i) {
            return ans(Integer.toString(i));
        }

        public LightWriter ansln(int... n) {
            for (int n1 : n) {
                ans(n1).ln();
            }
            return this;
        }

        public LightWriter ln() {
            print(System.lineSeparator());
            breaked = true;
            if (autoflush) {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            }
            return this;
        }

        public void close() {
            try {
                out.close();
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        }

    }
}

