import java.util.Scanner;

public class Main {

    private static long largerDigit(long a, long b) {
        return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for (int i = 1; i <= Math.sqrt(n); i++) {
            if (n % i != 0) {
                continue;
            }
            long d = largerDigit(i, n / i);
            if (d < min || i == 1) {
                min = d;
            }
        }
        System.out.println(min);
    }

} import java.util.Scanner; Scanner java.util public class Main {

    private static long largerDigit(long a, long b) {
        return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for (int i = 1; i <= Math.sqrt(n); i++) {
            if (n % i != 0) {
                continue;
            }
            long d = largerDigit(i, n / i);
            if (d < min || i == 1) {
                min = d;
            }
        }
        System.out.println(min);
    }

} Main private static long largerDigit(long a, long b) {
        return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
    } largerDigit {
        return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
    } return Math.max(String.valueOf(a).length(), String.valueOf(b).length()); Math.max(String.valueOf(a).length(), String.valueOf(b).length()) Math.max Math String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b long a a long b b public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for (int i = 1; i <= Math.sqrt(n); i++) {
            if (n % i != 0) {
                continue;
            }
            long d = largerDigit(i, n / i);
            if (d < min || i == 1) {
                min = d;
            }
        }
        System.out.println(min);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for (int i = 1; i <= Math.sqrt(n); i++) {
            if (n % i != 0) {
                continue;
            }
            long d = largerDigit(i, n / i);
            if (d < min || i == 1) {
                min = d;
            }
        }
        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 long min = 0; min 0 for (int i = 1; i <= Math.sqrt(n); i++) {
            if (n % i != 0) {
                continue;
            }
            long d = largerDigit(i, n / i);
            if (d < min || i == 1) {
                min = d;
            }
        } 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 d = largerDigit(i, n / i);
            if (d < min || i == 1) {
                min = d;
            }
        } {
            if (n % i != 0) {
                continue;
            }
            long d = largerDigit(i, n / i);
            if (d < min || i == 1) {
                min = d;
            }
        } if (n % i != 0) {
                continue;
            } n % i != 0 n % i n i 0 {
                continue;
            } continue; long d = largerDigit(i, n / i); d largerDigit(i, n / i) largerDigit i n / i n i if (d < min || i == 1) {
                min = d;
            } d < min || i == 1 d < min d min i == 1 i 1 {
                min = d;
            } min = d min d System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {

    private static long largerDigit(long a, long b) {
        return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for (int i = 1; i <= Math.sqrt(n); i++) {
            if (n % i != 0) {
                continue;
            }
            long d = largerDigit(i, n / i);
            if (d < min || i == 1) {
                min = d;
            }
        }
        System.out.println(min);
    }

} public class Main {

    private static long largerDigit(long a, long b) {
        return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for (int i = 1; i <= Math.sqrt(n); i++) {
            if (n % i != 0) {
                continue;
            }
            long d = largerDigit(i, n / i);
            if (d < min || i == 1) {
                min = d;
            }
        }
        System.out.println(min);
    }

} Main
import java.util.Scanner;

public class Main {

    private static long largerDigit(long a, long b) {
        return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for (int i = 1; i <= Math.sqrt(n); i++) {
            if (n % i != 0) {
                continue;
            }
            long d = largerDigit(i, n / i);
            if (d < min || i == 1) {
                min = d;
            }
        }
        System.out.println(min);
    }

}
