import java.io.IOException;

import java.io.BufferedReader;
import java.io.InputStreamReader;

import java.io.PrintWriter;

import java.util.ArrayList;

class Pair {
    long first;
    long second;

    Pair (long first, long second) {
        this.first = first;
        this.second = second;
    }
}

@SuppressWarnings("unchecked")
public class Main {
    // 約数
    static void devisor(ArrayList<Pair> dev,long N) {
        long n;
        long i = 1;

        n = N;

        while (i <= Math.sqrt(n)) {
            if (n % i == 0) dev.add(new Pair(i, n / i));
            i++;
        }
    }

    static int f(long first, long second) {
        return (int)Math.max(Math.log10(first), Math.log10(second)) + 1;
    }

    public static void main(String[] args) throws IOException {
        final String s;

        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            s = reader.readLine();
        }

        PrintWriter out = new PrintWriter(System.out);

        long N = Long.parseLong(s);

        ArrayList<Pair> dev = new ArrayList<Pair>();

        devisor(dev, N);

        int ans = Integer.MAX_VALUE;

        for (int i = 0; i < dev.size(); i++) {
            Pair p = dev.get(i);

            int tmp = f(p.first, p.second);

            ans = Math.min(ans, tmp);
        }

        out.println(ans);

        out.flush();
    }
} import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io import java.util.ArrayList; ArrayList java.util class Pair {
    long first;
    long second;

    Pair (long first, long second) {
        this.first = first;
        this.second = second;
    }
} Pair long first; first long second; second Pair (long first, long second) {
        this.first = first;
        this.second = second;
    } Pair {
        this.first = first;
        this.second = second;
    } this.first = first this.first this this.first first this.second = second this.second this this.second second long first first long second second public class Main {
    // 約数
    static void devisor(ArrayList<Pair> dev,long N) {
        long n;
        long i = 1;

        n = N;

        while (i <= Math.sqrt(n)) {
            if (n % i == 0) dev.add(new Pair(i, n / i));
            i++;
        }
    }

    static int f(long first, long second) {
        return (int)Math.max(Math.log10(first), Math.log10(second)) + 1;
    }

    public static void main(String[] args) throws IOException {
        final String s;

        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            s = reader.readLine();
        }

        PrintWriter out = new PrintWriter(System.out);

        long N = Long.parseLong(s);

        ArrayList<Pair> dev = new ArrayList<Pair>();

        devisor(dev, N);

        int ans = Integer.MAX_VALUE;

        for (int i = 0; i < dev.size(); i++) {
            Pair p = dev.get(i);

            int tmp = f(p.first, p.second);

            ans = Math.min(ans, tmp);
        }

        out.println(ans);

        out.flush();
    }
} Main // 約数
    static void devisor(ArrayList<Pair> dev,long N) {
        long n;
        long i = 1;

        n = N;

        while (i <= Math.sqrt(n)) {
            if (n % i == 0) dev.add(new Pair(i, n / i));
            i++;
        }
    } devisor {
        long n;
        long i = 1;

        n = N;

        while (i <= Math.sqrt(n)) {
            if (n % i == 0) dev.add(new Pair(i, n / i));
            i++;
        }
    } long n; n long i = 1; i 1 n = N n N while (i <= Math.sqrt(n)) {
            if (n % i == 0) dev.add(new Pair(i, n / i));
            i++;
        } i <= Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n {
            if (n % i == 0) dev.add(new Pair(i, n / i));
            i++;
        } if (n % i == 0) dev.add(new Pair(i, n / i)); n % i == 0 n % i n i 0 dev.add(new Pair(i, n / i)) dev.add dev new Pair(i, n / i) i++ i ArrayList<Pair> dev dev long N N static int f(long first, long second) {
        return (int)Math.max(Math.log10(first), Math.log10(second)) + 1;
    } f {
        return (int)Math.max(Math.log10(first), Math.log10(second)) + 1;
    } return (int)Math.max(Math.log10(first), Math.log10(second)) + 1; (int)Math.max(Math.log10(first), Math.log10(second)) + 1 (int)Math.max(Math.log10(first), Math.log10(second)) Math.max Math Math.log10(first) Math.log10 Math first Math.log10(second) Math.log10 Math second 1 long first first long second second public static void main(String[] args) throws IOException {
        final String s;

        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            s = reader.readLine();
        }

        PrintWriter out = new PrintWriter(System.out);

        long N = Long.parseLong(s);

        ArrayList<Pair> dev = new ArrayList<Pair>();

        devisor(dev, N);

        int ans = Integer.MAX_VALUE;

        for (int i = 0; i < dev.size(); i++) {
            Pair p = dev.get(i);

            int tmp = f(p.first, p.second);

            ans = Math.min(ans, tmp);
        }

        out.println(ans);

        out.flush();
    } main {
        final String s;

        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            s = reader.readLine();
        }

        PrintWriter out = new PrintWriter(System.out);

        long N = Long.parseLong(s);

        ArrayList<Pair> dev = new ArrayList<Pair>();

        devisor(dev, N);

        int ans = Integer.MAX_VALUE;

        for (int i = 0; i < dev.size(); i++) {
            Pair p = dev.get(i);

            int tmp = f(p.first, p.second);

            ans = Math.min(ans, tmp);
        }

        out.println(ans);

        out.flush();
    } final String s; s try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            s = reader.readLine();
        } {
            s = reader.readLine();
        } BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in)) BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in)) new BufferedReader(
                new InputStreamReader(System.in)) s = reader.readLine() s reader.readLine() reader.readLine reader PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) long N = Long.parseLong(s); N Long.parseLong(s) Long.parseLong Long s ArrayList<Pair> dev = new ArrayList<Pair>(); dev new ArrayList<Pair>() devisor(dev, N) devisor dev N int ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i < dev.size(); i++) {
            Pair p = dev.get(i);

            int tmp = f(p.first, p.second);

            ans = Math.min(ans, tmp);
        } int i = 0; int i = 0; i 0 i < dev.size() i dev.size() dev.size dev i++ i++ i {
            Pair p = dev.get(i);

            int tmp = f(p.first, p.second);

            ans = Math.min(ans, tmp);
        } {
            Pair p = dev.get(i);

            int tmp = f(p.first, p.second);

            ans = Math.min(ans, tmp);
        } Pair p = dev.get(i); p dev.get(i) dev.get dev i int tmp = f(p.first, p.second); tmp f(p.first, p.second) f p.first p p.first p.second p p.second ans = Math.min(ans, tmp) ans Math.min(ans, tmp) Math.min Math ans tmp out.println(ans) out.println out ans out.flush() out.flush out String[] args args public class Main {
    // 約数
    static void devisor(ArrayList<Pair> dev,long N) {
        long n;
        long i = 1;

        n = N;

        while (i <= Math.sqrt(n)) {
            if (n % i == 0) dev.add(new Pair(i, n / i));
            i++;
        }
    }

    static int f(long first, long second) {
        return (int)Math.max(Math.log10(first), Math.log10(second)) + 1;
    }

    public static void main(String[] args) throws IOException {
        final String s;

        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            s = reader.readLine();
        }

        PrintWriter out = new PrintWriter(System.out);

        long N = Long.parseLong(s);

        ArrayList<Pair> dev = new ArrayList<Pair>();

        devisor(dev, N);

        int ans = Integer.MAX_VALUE;

        for (int i = 0; i < dev.size(); i++) {
            Pair p = dev.get(i);

            int tmp = f(p.first, p.second);

            ans = Math.min(ans, tmp);
        }

        out.println(ans);

        out.flush();
    }
} public class Main {
    // 約数
    static void devisor(ArrayList<Pair> dev,long N) {
        long n;
        long i = 1;

        n = N;

        while (i <= Math.sqrt(n)) {
            if (n % i == 0) dev.add(new Pair(i, n / i));
            i++;
        }
    }

    static int f(long first, long second) {
        return (int)Math.max(Math.log10(first), Math.log10(second)) + 1;
    }

    public static void main(String[] args) throws IOException {
        final String s;

        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            s = reader.readLine();
        }

        PrintWriter out = new PrintWriter(System.out);

        long N = Long.parseLong(s);

        ArrayList<Pair> dev = new ArrayList<Pair>();

        devisor(dev, N);

        int ans = Integer.MAX_VALUE;

        for (int i = 0; i < dev.size(); i++) {
            Pair p = dev.get(i);

            int tmp = f(p.first, p.second);

            ans = Math.min(ans, tmp);
        }

        out.println(ans);

        out.flush();
    }
} Main
import java.io.IOException;

import java.io.BufferedReader;
import java.io.InputStreamReader;

import java.io.PrintWriter;

import java.util.ArrayList;

class Pair {
    long first;
    long second;

    Pair (long first, long second) {
        this.first = first;
        this.second = second;
    }
}

@SuppressWarnings("unchecked")
public class Main {
    // 約数
    static void devisor(ArrayList<Pair> dev,long N) {
        long n;
        long i = 1;

        n = N;

        while (i <= Math.sqrt(n)) {
            if (n % i == 0) dev.add(new Pair(i, n / i));
            i++;
        }
    }

    static int f(long first, long second) {
        return (int)Math.max(Math.log10(first), Math.log10(second)) + 1;
    }

    public static void main(String[] args) throws IOException {
        final String s;

        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            s = reader.readLine();
        }

        PrintWriter out = new PrintWriter(System.out);

        long N = Long.parseLong(s);

        ArrayList<Pair> dev = new ArrayList<Pair>();

        devisor(dev, N);

        int ans = Integer.MAX_VALUE;

        for (int i = 0; i < dev.size(); i++) {
            Pair p = dev.get(i);

            int tmp = f(p.first, p.second);

            ans = Math.min(ans, tmp);
        }

        out.println(ans);

        out.flush();
    }
}
