import java.util.Scanner;

public class Main {
    private static int countDigits(long x) {
        int result = 0;
        while (x > 0) {
            result++;
            x /= 10;
        }
        return result;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int result = Integer.MAX_VALUE;
        for (long i = 1; i * i <= n; i++) {
            if (n % i > 0) {
                continue;
            }
            result = Math.min(result, Math.max(countDigits(i), countDigits(n / i)));
        }
        System.out.println(result);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    private static int countDigits(long x) {
        int result = 0;
        while (x > 0) {
            result++;
            x /= 10;
        }
        return result;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int result = Integer.MAX_VALUE;
        for (long i = 1; i * i <= n; i++) {
            if (n % i > 0) {
                continue;
            }
            result = Math.min(result, Math.max(countDigits(i), countDigits(n / i)));
        }
        System.out.println(result);
    }
} Main private static int countDigits(long x) {
        int result = 0;
        while (x > 0) {
            result++;
            x /= 10;
        }
        return result;
    } countDigits {
        int result = 0;
        while (x > 0) {
            result++;
            x /= 10;
        }
        return result;
    } int result = 0; result 0 while (x > 0) {
            result++;
            x /= 10;
        } x > 0 x 0 {
            result++;
            x /= 10;
        } result++ result x /= 10 x 10 return result; result long x x public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int result = Integer.MAX_VALUE;
        for (long i = 1; i * i <= n; i++) {
            if (n % i > 0) {
                continue;
            }
            result = Math.min(result, Math.max(countDigits(i), countDigits(n / i)));
        }
        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int result = Integer.MAX_VALUE;
        for (long i = 1; i * i <= n; i++) {
            if (n % i > 0) {
                continue;
            }
            result = Math.min(result, Math.max(countDigits(i), countDigits(n / i)));
        }
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int result = Integer.MAX_VALUE; result Integer.MAX_VALUE Integer Integer.MAX_VALUE for (long i = 1; i * i <= n; i++) {
            if (n % i > 0) {
                continue;
            }
            result = Math.min(result, Math.max(countDigits(i), countDigits(n / i)));
        } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
            if (n % i > 0) {
                continue;
            }
            result = Math.min(result, Math.max(countDigits(i), countDigits(n / i)));
        } {
            if (n % i > 0) {
                continue;
            }
            result = Math.min(result, Math.max(countDigits(i), countDigits(n / i)));
        } if (n % i > 0) {
                continue;
            } n % i > 0 n % i n i 0 {
                continue;
            } continue; result = Math.min(result, Math.max(countDigits(i), countDigits(n / i))) result Math.min(result, Math.max(countDigits(i), countDigits(n / i))) Math.min Math result Math.max(countDigits(i), countDigits(n / i)) Math.max Math countDigits(i) countDigits i countDigits(n / i) countDigits n / i n i System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    private static int countDigits(long x) {
        int result = 0;
        while (x > 0) {
            result++;
            x /= 10;
        }
        return result;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int result = Integer.MAX_VALUE;
        for (long i = 1; i * i <= n; i++) {
            if (n % i > 0) {
                continue;
            }
            result = Math.min(result, Math.max(countDigits(i), countDigits(n / i)));
        }
        System.out.println(result);
    }
} public class Main {
    private static int countDigits(long x) {
        int result = 0;
        while (x > 0) {
            result++;
            x /= 10;
        }
        return result;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int result = Integer.MAX_VALUE;
        for (long i = 1; i * i <= n; i++) {
            if (n % i > 0) {
                continue;
            }
            result = Math.min(result, Math.max(countDigits(i), countDigits(n / i)));
        }
        System.out.println(result);
    }
} Main
import java.util.Scanner;

public class Main {
    private static int countDigits(long x) {
        int result = 0;
        while (x > 0) {
            result++;
            x /= 10;
        }
        return result;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int result = Integer.MAX_VALUE;
        for (long i = 1; i * i <= n; i++) {
            if (n % i > 0) {
                continue;
            }
            result = Math.min(result, Math.max(countDigits(i), countDigits(n / i)));
        }
        System.out.println(result);
    }
}