import java.util.Scanner;

public class Main {

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

        for (int i = (int) Math.sqrt(n); i >= 0; --i) {
            if (n % i == 0) {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            }
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

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

        for (int i = (int) Math.sqrt(n); i >= 0; --i) {
            if (n % i == 0) {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long n = scan.nextLong();

        for (int i = (int) Math.sqrt(n); i >= 0; --i) {
            if (n % i == 0) {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            }
        }
    } main {
        Scanner scan = new Scanner(System.in);
        long n = scan.nextLong();

        for (int i = (int) Math.sqrt(n); i >= 0; --i) {
            if (n % i == 0) {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            }
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long n = scan.nextLong(); n scan.nextLong() scan.nextLong scan for (int i = (int) Math.sqrt(n); i >= 0; --i) {
            if (n % i == 0) {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            }
        } int i = (int) Math.sqrt(n); int i = (int) Math.sqrt(n); i (int) Math.sqrt(n) Math.sqrt Math n i >= 0 i 0 --i --i i {
            if (n % i == 0) {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            }
        } {
            if (n % i == 0) {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            }
        } if (n % i == 0) {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            } n % i == 0 n % i n i 0 {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            } int digit = Long.toString(Math.max(n / i, i)).length(); digit Long.toString(Math.max(n / i, i)).length() Long.toString(Math.max(n / i, i)).length Long.toString(Math.max(n / i, i)) Long.toString Long Math.max(n / i, i) Math.max Math n / i n i i System.out.println(digit) System.out.println System.out System System.out digit break; String[] args args public class Main {

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

        for (int i = (int) Math.sqrt(n); i >= 0; --i) {
            if (n % i == 0) {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            }
        }
    }
} public class Main {

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

        for (int i = (int) Math.sqrt(n); i >= 0; --i) {
            if (n % i == 0) {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            }
        }
    }
} Main
import java.util.Scanner;

public class Main {

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

        for (int i = (int) Math.sqrt(n); i >= 0; --i) {
            if (n % i == 0) {
                int digit = Long.toString(Math.max(n / i, i)).length();
                System.out.println(digit);
                break;
            }
        }
    }
}