import java.util.*;
import java.util.concurrent.atomic.LongAccumulator;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long ans = Long.MAX_VALUE;
        long f, b;
        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            }
        }
        System.out.println(ans);
    }

    public static long clac_digit(long n) {
        long res = 0;
        while (n > 0) {
            res++;
            n /= 10;
        }
        return res;
    }
} import java.util.*; util.* java import java.util.concurrent.atomic.LongAccumulator; LongAccumulator java.util.concurrent.atomic public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long ans = Long.MAX_VALUE;
        long f, b;
        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            }
        }
        System.out.println(ans);
    }

    public static long clac_digit(long n) {
        long res = 0;
        while (n > 0) {
            res++;
            n /= 10;
        }
        return res;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long ans = Long.MAX_VALUE;
        long f, b;
        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long ans = Long.MAX_VALUE;
        long f, b;
        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long ans = Long.MAX_VALUE; ans Long.MAX_VALUE Long Long.MAX_VALUE long f f b; b for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            }
        } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
            if (n % i == 0) {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            }
        } {
            if (n % i == 0) {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            }
        } if (n % i == 0) {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            } n % i == 0 n % i n i 0 {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            } b = n / i b n / i n i f = Math.max(clac_digit(i), clac_digit(b)) f Math.max(clac_digit(i), clac_digit(b)) Math.max Math clac_digit(i) clac_digit i clac_digit(b) clac_digit b ans = Math.min(ans, f) ans Math.min(ans, f) Math.min Math ans f System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static long clac_digit(long n) {
        long res = 0;
        while (n > 0) {
            res++;
            n /= 10;
        }
        return res;
    } clac_digit {
        long res = 0;
        while (n > 0) {
            res++;
            n /= 10;
        }
        return res;
    } long res = 0; res 0 while (n > 0) {
            res++;
            n /= 10;
        } n > 0 n 0 {
            res++;
            n /= 10;
        } res++ res n /= 10 n 10 return res; res long n n public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long ans = Long.MAX_VALUE;
        long f, b;
        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            }
        }
        System.out.println(ans);
    }

    public static long clac_digit(long n) {
        long res = 0;
        while (n > 0) {
            res++;
            n /= 10;
        }
        return res;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long ans = Long.MAX_VALUE;
        long f, b;
        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            }
        }
        System.out.println(ans);
    }

    public static long clac_digit(long n) {
        long res = 0;
        while (n > 0) {
            res++;
            n /= 10;
        }
        return res;
    }
} Main
import java.util.*;
import java.util.concurrent.atomic.LongAccumulator;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long ans = Long.MAX_VALUE;
        long f, b;
        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                b = n / i;
                f = Math.max(clac_digit(i), clac_digit(b));
                ans = Math.min(ans, f);
            }
        }
        System.out.println(ans);
    }

    public static long clac_digit(long n) {
        long res = 0;
        while (n > 0) {
            res++;
            n /= 10;
        }
        return res;
    }
}