import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 100;
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            }
        }
        System.out.println(min);
    }

    static long countMaxDigits(long dev1, long dev2) {
        long count = 0;
        while(dev1 != 0 || dev2 != 0) {
            count++;
            dev1 /= 10;
            dev2 /= 10;
        }
        return count;
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 100;
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            }
        }
        System.out.println(min);
    }

    static long countMaxDigits(long dev1, long dev2) {
        long count = 0;
        while(dev1 != 0 || dev2 != 0) {
            count++;
            dev1 /= 10;
            dev2 /= 10;
        }
        return count;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 100;
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            }
        }
        System.out.println(min);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 100;
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            }
        }
        System.out.println(min);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long min = 100; min 100 for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            }
        } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
            if(n % i == 0) {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            }
        } {
            if(n % i == 0) {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            }
        } if(n % i == 0) {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            } n % i == 0 n % i n i 0 {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            } long devider = n / i; devider n / i n i long maxDigits = countMaxDigits(i, devider); maxDigits countMaxDigits(i, devider) countMaxDigits i devider min = Math.min(min, maxDigits) min Math.min(min, maxDigits) Math.min Math min maxDigits System.out.println(min) System.out.println System.out System System.out min String[] args args static long countMaxDigits(long dev1, long dev2) {
        long count = 0;
        while(dev1 != 0 || dev2 != 0) {
            count++;
            dev1 /= 10;
            dev2 /= 10;
        }
        return count;
    } countMaxDigits {
        long count = 0;
        while(dev1 != 0 || dev2 != 0) {
            count++;
            dev1 /= 10;
            dev2 /= 10;
        }
        return count;
    } long count = 0; count 0 while(dev1 != 0 || dev2 != 0) {
            count++;
            dev1 /= 10;
            dev2 /= 10;
        } dev1 != 0 || dev2 != 0 dev1 != 0 dev1 0 dev2 != 0 dev2 0 {
            count++;
            dev1 /= 10;
            dev2 /= 10;
        } count++ count dev1 /= 10 dev1 10 dev2 /= 10 dev2 10 return count; count long dev1 dev1 long dev2 dev2 public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 100;
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            }
        }
        System.out.println(min);
    }

    static long countMaxDigits(long dev1, long dev2) {
        long count = 0;
        while(dev1 != 0 || dev2 != 0) {
            count++;
            dev1 /= 10;
            dev2 /= 10;
        }
        return count;
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 100;
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            }
        }
        System.out.println(min);
    }

    static long countMaxDigits(long dev1, long dev2) {
        long count = 0;
        while(dev1 != 0 || dev2 != 0) {
            count++;
            dev1 /= 10;
            dev2 /= 10;
        }
        return count;
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 100;
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                long devider = n / i;
                long maxDigits = countMaxDigits(i, devider);
                min = Math.min(min, maxDigits);
            }
        }
        System.out.println(min);
    }

    static long countMaxDigits(long dev1, long dev2) {
        long count = 0;
        while(dev1 != 0 || dev2 != 0) {
            count++;
            dev1 /= 10;
            dev2 /= 10;
        }
        return count;
    }
}
