import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long val1 = sc.nextLong();

        long count = ("" + val1).length();
        for (long i = 1; (i * i) <= val1; i++) {
            if ((val1 % i) != 0) {
                continue;
            }
            long n = val1 / i;
            String a = "" + i;
            String b = "" + n;
            long val = Math.max(a.length(), b.length());
            if (count > val) {
                count = val;
            }
        }
        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long val1 = sc.nextLong();

        long count = ("" + val1).length();
        for (long i = 1; (i * i) <= val1; i++) {
            if ((val1 % i) != 0) {
                continue;
            }
            long n = val1 / i;
            String a = "" + i;
            String b = "" + n;
            long val = Math.max(a.length(), b.length());
            if (count > val) {
                count = val;
            }
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long val1 = sc.nextLong();

        long count = ("" + val1).length();
        for (long i = 1; (i * i) <= val1; i++) {
            if ((val1 % i) != 0) {
                continue;
            }
            long n = val1 / i;
            String a = "" + i;
            String b = "" + n;
            long val = Math.max(a.length(), b.length());
            if (count > val) {
                count = val;
            }
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);

        long val1 = sc.nextLong();

        long count = ("" + val1).length();
        for (long i = 1; (i * i) <= val1; i++) {
            if ((val1 % i) != 0) {
                continue;
            }
            long n = val1 / i;
            String a = "" + i;
            String b = "" + n;
            long val = Math.max(a.length(), b.length());
            if (count > val) {
                count = val;
            }
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long val1 = sc.nextLong(); val1 sc.nextLong() sc.nextLong sc long count = ("" + val1).length(); count ("" + val1).length() ("" + val1).length ("" + val1) "" val1 for (long i = 1; (i * i) <= val1; i++) {
            if ((val1 % i) != 0) {
                continue;
            }
            long n = val1 / i;
            String a = "" + i;
            String b = "" + n;
            long val = Math.max(a.length(), b.length());
            if (count > val) {
                count = val;
            }
        } long i = 1; long i = 1; i 1 (i * i) <= val1 (i * i) i i val1 i++ i++ i {
            if ((val1 % i) != 0) {
                continue;
            }
            long n = val1 / i;
            String a = "" + i;
            String b = "" + n;
            long val = Math.max(a.length(), b.length());
            if (count > val) {
                count = val;
            }
        } {
            if ((val1 % i) != 0) {
                continue;
            }
            long n = val1 / i;
            String a = "" + i;
            String b = "" + n;
            long val = Math.max(a.length(), b.length());
            if (count > val) {
                count = val;
            }
        } if ((val1 % i) != 0) {
                continue;
            } (val1 % i) != 0 (val1 % i) val1 i 0 {
                continue;
            } continue; long n = val1 / i; n val1 / i val1 i String a = "" + i; a "" + i "" i String b = "" + n; b "" + n "" n long val = Math.max(a.length(), b.length()); val Math.max(a.length(), b.length()) Math.max Math a.length() a.length a b.length() b.length b if (count > val) {
                count = val;
            } count > val count val {
                count = val;
            } count = val count val System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long val1 = sc.nextLong();

        long count = ("" + val1).length();
        for (long i = 1; (i * i) <= val1; i++) {
            if ((val1 % i) != 0) {
                continue;
            }
            long n = val1 / i;
            String a = "" + i;
            String b = "" + n;
            long val = Math.max(a.length(), b.length());
            if (count > val) {
                count = val;
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long val1 = sc.nextLong();

        long count = ("" + val1).length();
        for (long i = 1; (i * i) <= val1; i++) {
            if ((val1 % i) != 0) {
                continue;
            }
            long n = val1 / i;
            String a = "" + i;
            String b = "" + n;
            long val = Math.max(a.length(), b.length());
            if (count > val) {
                count = val;
            }
        }
        System.out.println(count);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long val1 = sc.nextLong();

        long count = ("" + val1).length();
        for (long i = 1; (i * i) <= val1; i++) {
            if ((val1 % i) != 0) {
                continue;
            }
            long n = val1 / i;
            String a = "" + i;
            String b = "" + n;
            long val = Math.max(a.length(), b.length());
            if (count > val) {
                count = val;
            }
        }
        System.out.println(count);
    }
}