import java.util.*;

public class Main {

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

        long rn = (long) Math.sqrt(N);
        ArrayList<Integer> ans = new ArrayList<>();
        for (long i = 1; i <= rn; i++) {
            if (N % i != 0) {
                continue;
            } else {
                long j = N / i;
                ans.add(dig(i, j));
            }
        }
        Collections.sort(ans);
        System.out.println(ans.get(0));
    }

    private static int dig(long a, long b) {
        int ad = 0;
        while (a > 0) {
            a /= 10;
            ad++;
        }
        int bd = 0;
        while (b > 0) {
            b /= 10;
            bd++;
        }
        return Math.max(ad, bd);
    }
} import java.util.*; util.* java public class Main {

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

        long rn = (long) Math.sqrt(N);
        ArrayList<Integer> ans = new ArrayList<>();
        for (long i = 1; i <= rn; i++) {
            if (N % i != 0) {
                continue;
            } else {
                long j = N / i;
                ans.add(dig(i, j));
            }
        }
        Collections.sort(ans);
        System.out.println(ans.get(0));
    }

    private static int dig(long a, long b) {
        int ad = 0;
        while (a > 0) {
            a /= 10;
            ad++;
        }
        int bd = 0;
        while (b > 0) {
            b /= 10;
            bd++;
        }
        return Math.max(ad, bd);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        sc.close();

        long rn = (long) Math.sqrt(N);
        ArrayList<Integer> ans = new ArrayList<>();
        for (long i = 1; i <= rn; i++) {
            if (N % i != 0) {
                continue;
            } else {
                long j = N / i;
                ans.add(dig(i, j));
            }
        }
        Collections.sort(ans);
        System.out.println(ans.get(0));
    } main {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        sc.close();

        long rn = (long) Math.sqrt(N);
        ArrayList<Integer> ans = new ArrayList<>();
        for (long i = 1; i <= rn; i++) {
            if (N % i != 0) {
                continue;
            } else {
                long j = N / i;
                ans.add(dig(i, j));
            }
        }
        Collections.sort(ans);
        System.out.println(ans.get(0));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc sc.close() sc.close sc long rn = (long) Math.sqrt(N); rn (long) Math.sqrt(N) Math.sqrt Math N ArrayList<Integer> ans = new ArrayList<>(); ans new ArrayList<>() for (long i = 1; i <= rn; i++) {
            if (N % i != 0) {
                continue;
            } else {
                long j = N / i;
                ans.add(dig(i, j));
            }
        } long i = 1; long i = 1; i 1 i <= rn i rn i++ i++ i {
            if (N % i != 0) {
                continue;
            } else {
                long j = N / i;
                ans.add(dig(i, j));
            }
        } {
            if (N % i != 0) {
                continue;
            } else {
                long j = N / i;
                ans.add(dig(i, j));
            }
        } if (N % i != 0) {
                continue;
            } else {
                long j = N / i;
                ans.add(dig(i, j));
            } N % i != 0 N % i N i 0 {
                continue;
            } continue; {
                long j = N / i;
                ans.add(dig(i, j));
            } long j = N / i; j N / i N i ans.add(dig(i, j)) ans.add ans dig(i, j) dig i j Collections.sort(ans) Collections.sort Collections ans System.out.println(ans.get(0)) System.out.println System.out System System.out ans.get(0) ans.get ans 0 String[] args args private static int dig(long a, long b) {
        int ad = 0;
        while (a > 0) {
            a /= 10;
            ad++;
        }
        int bd = 0;
        while (b > 0) {
            b /= 10;
            bd++;
        }
        return Math.max(ad, bd);
    } dig {
        int ad = 0;
        while (a > 0) {
            a /= 10;
            ad++;
        }
        int bd = 0;
        while (b > 0) {
            b /= 10;
            bd++;
        }
        return Math.max(ad, bd);
    } int ad = 0; ad 0 while (a > 0) {
            a /= 10;
            ad++;
        } a > 0 a 0 {
            a /= 10;
            ad++;
        } a /= 10 a 10 ad++ ad int bd = 0; bd 0 while (b > 0) {
            b /= 10;
            bd++;
        } b > 0 b 0 {
            b /= 10;
            bd++;
        } b /= 10 b 10 bd++ bd return Math.max(ad, bd); Math.max(ad, bd) Math.max Math ad bd long a a long b b public class Main {

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

        long rn = (long) Math.sqrt(N);
        ArrayList<Integer> ans = new ArrayList<>();
        for (long i = 1; i <= rn; i++) {
            if (N % i != 0) {
                continue;
            } else {
                long j = N / i;
                ans.add(dig(i, j));
            }
        }
        Collections.sort(ans);
        System.out.println(ans.get(0));
    }

    private static int dig(long a, long b) {
        int ad = 0;
        while (a > 0) {
            a /= 10;
            ad++;
        }
        int bd = 0;
        while (b > 0) {
            b /= 10;
            bd++;
        }
        return Math.max(ad, bd);
    }
} public class Main {

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

        long rn = (long) Math.sqrt(N);
        ArrayList<Integer> ans = new ArrayList<>();
        for (long i = 1; i <= rn; i++) {
            if (N % i != 0) {
                continue;
            } else {
                long j = N / i;
                ans.add(dig(i, j));
            }
        }
        Collections.sort(ans);
        System.out.println(ans.get(0));
    }

    private static int dig(long a, long b) {
        int ad = 0;
        while (a > 0) {
            a /= 10;
            ad++;
        }
        int bd = 0;
        while (b > 0) {
            b /= 10;
            bd++;
        }
        return Math.max(ad, bd);
    }
} Main
import java.util.*;

public class Main {

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

        long rn = (long) Math.sqrt(N);
        ArrayList<Integer> ans = new ArrayList<>();
        for (long i = 1; i <= rn; i++) {
            if (N % i != 0) {
                continue;
            } else {
                long j = N / i;
                ans.add(dig(i, j));
            }
        }
        Collections.sort(ans);
        System.out.println(ans.get(0));
    }

    private static int dig(long a, long b) {
        int ad = 0;
        while (a > 0) {
            a /= 10;
            ad++;
        }
        int bd = 0;
        while (b > 0) {
            b /= 10;
            bd++;
        }
        return Math.max(ad, bd);
    }
}
