import java.util.Scanner;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long ANS = (long) Math.sqrt(N);
        long ans = Long.MAX_VALUE;
        for (long i = 1; i <= (long) Math.sqrt(N); i++) {
            if (N % i == 0) {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            }
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long ANS = (long) Math.sqrt(N);
        long ans = Long.MAX_VALUE;
        for (long i = 1; i <= (long) Math.sqrt(N); i++) {
            if (N % i == 0) {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args void solve() {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long ANS = (long) Math.sqrt(N);
        long ans = Long.MAX_VALUE;
        for (long i = 1; i <= (long) Math.sqrt(N); i++) {
            if (N % i == 0) {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            }
        }
        System.out.println(ans);
    } solve {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long ANS = (long) Math.sqrt(N);
        long ans = Long.MAX_VALUE;
        for (long i = 1; i <= (long) Math.sqrt(N); i++) {
            if (N % i == 0) {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long ANS = (long) Math.sqrt(N); ANS (long) Math.sqrt(N) Math.sqrt Math N long ans = Long.MAX_VALUE; ans Long.MAX_VALUE Long Long.MAX_VALUE for (long i = 1; i <= (long) Math.sqrt(N); i++) {
            if (N % i == 0) {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            }
        } long i = 1; long i = 1; i 1 i <= (long) Math.sqrt(N) i (long) Math.sqrt(N) Math.sqrt Math N i++ i++ i {
            if (N % i == 0) {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            }
        } {
            if (N % i == 0) {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            }
        } if (N % i == 0) {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            } N % i == 0 N % i N i 0 {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            } long A = Math.max(N / i, i); A Math.max(N / i, i) Math.max Math N / i N i i ans = Math.min(String.valueOf(A).length(), ans) ans Math.min(String.valueOf(A).length(), ans) Math.min Math String.valueOf(A).length() String.valueOf(A).length String.valueOf(A) String.valueOf String A ans System.out.println(ans) System.out.println System.out System System.out ans public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long ANS = (long) Math.sqrt(N);
        long ans = Long.MAX_VALUE;
        for (long i = 1; i <= (long) Math.sqrt(N); i++) {
            if (N % i == 0) {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            }
        }
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long ANS = (long) Math.sqrt(N);
        long ans = Long.MAX_VALUE;
        for (long i = 1; i <= (long) Math.sqrt(N); i++) {
            if (N % i == 0) {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long ANS = (long) Math.sqrt(N);
        long ans = Long.MAX_VALUE;
        for (long i = 1; i <= (long) Math.sqrt(N); i++) {
            if (N % i == 0) {
                long A = Math.max(N / i, i);
                ans = Math.min(String.valueOf(A).length(), ans);
            }
        }
        System.out.println(ans);
    }
}