import java.util.Scanner;

public class Main {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final long n = scanner.nextLong();

        for (long i = (int) Math.sqrt(n); i >= 2; i--) {
            if (n % i == 0) {
                System.out.println(Long.toString(n / i).length());
                return;
            }
        }

        System.out.println(Long.toString(n).length());
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final long n = scanner.nextLong();

        for (long i = (int) Math.sqrt(n); i >= 2; i--) {
            if (n % i == 0) {
                System.out.println(Long.toString(n / i).length());
                return;
            }
        }

        System.out.println(Long.toString(n).length());
    }
} Main public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final long n = scanner.nextLong();

        for (long i = (int) Math.sqrt(n); i >= 2; i--) {
            if (n % i == 0) {
                System.out.println(Long.toString(n / i).length());
                return;
            }
        }

        System.out.println(Long.toString(n).length());
    } main {
        final Scanner scanner = new Scanner(System.in);
        final long n = scanner.nextLong();

        for (long i = (int) Math.sqrt(n); i >= 2; i--) {
            if (n % i == 0) {
                System.out.println(Long.toString(n / i).length());
                return;
            }
        }

        System.out.println(Long.toString(n).length());
    } final Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) final long n = scanner.nextLong(); n scanner.nextLong() scanner.nextLong scanner for (long i = (int) Math.sqrt(n); i >= 2; i--) {
            if (n % i == 0) {
                System.out.println(Long.toString(n / i).length());
                return;
            }
        } long i = (int) Math.sqrt(n); long i = (int) Math.sqrt(n); i (int) Math.sqrt(n) Math.sqrt Math n i >= 2 i 2 i-- i-- i {
            if (n % i == 0) {
                System.out.println(Long.toString(n / i).length());
                return;
            }
        } {
            if (n % i == 0) {
                System.out.println(Long.toString(n / i).length());
                return;
            }
        } if (n % i == 0) {
                System.out.println(Long.toString(n / i).length());
                return;
            } n % i == 0 n % i n i 0 {
                System.out.println(Long.toString(n / i).length());
                return;
            } System.out.println(Long.toString(n / i).length()) System.out.println System.out System System.out Long.toString(n / i).length() Long.toString(n / i).length Long.toString(n / i) Long.toString Long n / i n i return; System.out.println(Long.toString(n).length()) System.out.println System.out System System.out Long.toString(n).length() Long.toString(n).length Long.toString(n) Long.toString Long n final String[] args args public class Main {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final long n = scanner.nextLong();

        for (long i = (int) Math.sqrt(n); i >= 2; i--) {
            if (n % i == 0) {
                System.out.println(Long.toString(n / i).length());
                return;
            }
        }

        System.out.println(Long.toString(n).length());
    }
} public class Main {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final long n = scanner.nextLong();

        for (long i = (int) Math.sqrt(n); i >= 2; i--) {
            if (n % i == 0) {
                System.out.println(Long.toString(n / i).length());
                return;
            }
        }

        System.out.println(Long.toString(n).length());
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final long n = scanner.nextLong();

        for (long i = (int) Math.sqrt(n); i >= 2; i--) {
            if (n % i == 0) {
                System.out.println(Long.toString(n / i).length());
                return;
            }
        }

        System.out.println(Long.toString(n).length());
    }
}