import java.util.*;

public class Main {
    public static int solve(long n) {
        long a = 1;
        long b;
        long border = (long)Math.sqrt(n);
        int min = getNumDigit(n);

        while (a <= border) {
            if (n % a == 0) {
                b = n / a;
                if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                }
            }
            a++;
        }
        return min;
    }

    public static int getNumDigit(long n) {
        return Long.toString(n).length();
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        System.out.println(solve(N));
    }
} import java.util.*; util.* java public class Main {
    public static int solve(long n) {
        long a = 1;
        long b;
        long border = (long)Math.sqrt(n);
        int min = getNumDigit(n);

        while (a <= border) {
            if (n % a == 0) {
                b = n / a;
                if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                }
            }
            a++;
        }
        return min;
    }

    public static int getNumDigit(long n) {
        return Long.toString(n).length();
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        System.out.println(solve(N));
    }
} Main public static int solve(long n) {
        long a = 1;
        long b;
        long border = (long)Math.sqrt(n);
        int min = getNumDigit(n);

        while (a <= border) {
            if (n % a == 0) {
                b = n / a;
                if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                }
            }
            a++;
        }
        return min;
    } solve {
        long a = 1;
        long b;
        long border = (long)Math.sqrt(n);
        int min = getNumDigit(n);

        while (a <= border) {
            if (n % a == 0) {
                b = n / a;
                if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                }
            }
            a++;
        }
        return min;
    } long a = 1; a 1 long b; b long border = (long)Math.sqrt(n); border (long)Math.sqrt(n) Math.sqrt Math n int min = getNumDigit(n); min getNumDigit(n) getNumDigit n while (a <= border) {
            if (n % a == 0) {
                b = n / a;
                if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                }
            }
            a++;
        } a <= border a border {
            if (n % a == 0) {
                b = n / a;
                if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                }
            }
            a++;
        } if (n % a == 0) {
                b = n / a;
                if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                }
            } n % a == 0 n % a n a 0 {
                b = n / a;
                if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                }
            } b = n / a b n / a n a if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                } getNumDigit(Math.max(a, b)) <= min getNumDigit(Math.max(a, b)) getNumDigit Math.max(a, b) Math.max Math a b min {
                    min = getNumDigit(Math.max(a,b));
                } min = getNumDigit(Math.max(a,b)) min getNumDigit(Math.max(a,b)) getNumDigit Math.max(a,b) Math.max Math a b a++ a return min; min long n n public static int getNumDigit(long n) {
        return Long.toString(n).length();
    } getNumDigit {
        return Long.toString(n).length();
    } return Long.toString(n).length(); Long.toString(n).length() Long.toString(n).length Long.toString(n) Long.toString Long n long n n public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        System.out.println(solve(N));
    } main {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        System.out.println(solve(N));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc System.out.println(solve(N)) System.out.println System.out System System.out solve(N) solve N String[] args args public class Main {
    public static int solve(long n) {
        long a = 1;
        long b;
        long border = (long)Math.sqrt(n);
        int min = getNumDigit(n);

        while (a <= border) {
            if (n % a == 0) {
                b = n / a;
                if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                }
            }
            a++;
        }
        return min;
    }

    public static int getNumDigit(long n) {
        return Long.toString(n).length();
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        System.out.println(solve(N));
    }
} public class Main {
    public static int solve(long n) {
        long a = 1;
        long b;
        long border = (long)Math.sqrt(n);
        int min = getNumDigit(n);

        while (a <= border) {
            if (n % a == 0) {
                b = n / a;
                if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                }
            }
            a++;
        }
        return min;
    }

    public static int getNumDigit(long n) {
        return Long.toString(n).length();
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        System.out.println(solve(N));
    }
} Main
import java.util.*;

public class Main {
    public static int solve(long n) {
        long a = 1;
        long b;
        long border = (long)Math.sqrt(n);
        int min = getNumDigit(n);

        while (a <= border) {
            if (n % a == 0) {
                b = n / a;
                if (getNumDigit(Math.max(a, b)) <= min) {
                    min = getNumDigit(Math.max(a,b));
                }
            }
            a++;
        }
        return min;
    }

    public static int getNumDigit(long n) {
        return Long.toString(n).length();
    }

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