
import java.util.Scanner;

class Main {

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

    void compute() {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 50;
        for (int i = 1; i <= Math.sqrt(N); i++) {
            if (N % i != 0) {
                continue;
            }
            long cur = N / i;
            int j;
            for (j = 0; cur != 0; cur /= 10, j++) {
            }
            min = j;
        }
        System.out.println(min);
    }
} import java.util.Scanner; Scanner java.util class Main {

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

    void compute() {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 50;
        for (int i = 1; i <= Math.sqrt(N); i++) {
            if (N % i != 0) {
                continue;
            }
            long cur = N / i;
            int j;
            for (j = 0; cur != 0; cur /= 10, j++) {
            }
            min = j;
        }
        System.out.println(min);
    }
} Main public static void main(String[] args) {
        new Main().compute();
    } main {
        new Main().compute();
    } new Main().compute() new Main().compute new Main() String[] args args void compute() {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 50;
        for (int i = 1; i <= Math.sqrt(N); i++) {
            if (N % i != 0) {
                continue;
            }
            long cur = N / i;
            int j;
            for (j = 0; cur != 0; cur /= 10, j++) {
            }
            min = j;
        }
        System.out.println(min);
    } compute {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 50;
        for (int i = 1; i <= Math.sqrt(N); i++) {
            if (N % i != 0) {
                continue;
            }
            long cur = N / i;
            int j;
            for (j = 0; cur != 0; cur /= 10, j++) {
            }
            min = j;
        }
        System.out.println(min);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int min = 50; min 50 for (int i = 1; i <= Math.sqrt(N); i++) {
            if (N % i != 0) {
                continue;
            }
            long cur = N / i;
            int j;
            for (j = 0; cur != 0; cur /= 10, j++) {
            }
            min = j;
        } int i = 1; int i = 1; i 1 i <= Math.sqrt(N) i Math.sqrt(N) Math.sqrt Math N i++ i++ i {
            if (N % i != 0) {
                continue;
            }
            long cur = N / i;
            int j;
            for (j = 0; cur != 0; cur /= 10, j++) {
            }
            min = j;
        } {
            if (N % i != 0) {
                continue;
            }
            long cur = N / i;
            int j;
            for (j = 0; cur != 0; cur /= 10, j++) {
            }
            min = j;
        } if (N % i != 0) {
                continue;
            } N % i != 0 N % i N i 0 {
                continue;
            } continue; long cur = N / i; cur N / i N i int j; j for (j = 0; cur != 0; cur /= 10, j++) {
            } j = 0; j = 0 j 0 cur != 0 cur 0 cur /= 10, j++ cur /= 10 cur 10 j++ j {
            } {
            } min = j min j System.out.println(min) System.out.println System.out System System.out min

import java.util.Scanner;

class Main {

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

    void compute() {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int min = 50;
        for (int i = 1; i <= Math.sqrt(N); i++) {
            if (N % i != 0) {
                continue;
            }
            long cur = N / i;
            int j;
            for (j = 0; cur != 0; cur /= 10, j++) {
            }
            min = j;
        }
        System.out.println(min);
    }
}
