import java.util.*;

public class Main {

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

        long digits = Integer.MAX_VALUE;
        for (long i = 1; i*i <= n; i++) {
            if (n % i != 0) continue;

            long tmpB = n/i;
            int tmpDigits = Math.max(digitsCount(i), digitsCount(tmpB));

            if (digits > tmpDigits) digits = tmpDigits;
        }

        System.out.println(digits);
    }

    public static int digitsCount(long a) {
        int ans = 0;
        while (a>0) {
            a/=10;
            ans++;
        }
        return ans;
    }
} 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 digits = Integer.MAX_VALUE;
        for (long i = 1; i*i <= n; i++) {
            if (n % i != 0) continue;

            long tmpB = n/i;
            int tmpDigits = Math.max(digitsCount(i), digitsCount(tmpB));

            if (digits > tmpDigits) digits = tmpDigits;
        }

        System.out.println(digits);
    }

    public static int digitsCount(long a) {
        int ans = 0;
        while (a>0) {
            a/=10;
            ans++;
        }
        return ans;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long digits = Integer.MAX_VALUE;
        for (long i = 1; i*i <= n; i++) {
            if (n % i != 0) continue;

            long tmpB = n/i;
            int tmpDigits = Math.max(digitsCount(i), digitsCount(tmpB));

            if (digits > tmpDigits) digits = tmpDigits;
        }

        System.out.println(digits);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        long digits = Integer.MAX_VALUE;
        for (long i = 1; i*i <= n; i++) {
            if (n % i != 0) continue;

            long tmpB = n/i;
            int tmpDigits = Math.max(digitsCount(i), digitsCount(tmpB));

            if (digits > tmpDigits) digits = tmpDigits;
        }

        System.out.println(digits);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long digits = Integer.MAX_VALUE; digits Integer.MAX_VALUE Integer Integer.MAX_VALUE for (long i = 1; i*i <= n; i++) {
            if (n % i != 0) continue;

            long tmpB = n/i;
            int tmpDigits = Math.max(digitsCount(i), digitsCount(tmpB));

            if (digits > tmpDigits) digits = tmpDigits;
        } long i = 1; long i = 1; i 1 i*i <= n i*i i i n i++ i++ i {
            if (n % i != 0) continue;

            long tmpB = n/i;
            int tmpDigits = Math.max(digitsCount(i), digitsCount(tmpB));

            if (digits > tmpDigits) digits = tmpDigits;
        } {
            if (n % i != 0) continue;

            long tmpB = n/i;
            int tmpDigits = Math.max(digitsCount(i), digitsCount(tmpB));

            if (digits > tmpDigits) digits = tmpDigits;
        } if (n % i != 0) continue; n % i != 0 n % i n i 0 continue; long tmpB = n/i; tmpB n/i n i int tmpDigits = Math.max(digitsCount(i), digitsCount(tmpB)); tmpDigits Math.max(digitsCount(i), digitsCount(tmpB)) Math.max Math digitsCount(i) digitsCount i digitsCount(tmpB) digitsCount tmpB if (digits > tmpDigits) digits = tmpDigits; digits > tmpDigits digits tmpDigits digits = tmpDigits digits tmpDigits System.out.println(digits) System.out.println System.out System System.out digits String[] args args public static int digitsCount(long a) {
        int ans = 0;
        while (a>0) {
            a/=10;
            ans++;
        }
        return ans;
    } digitsCount {
        int ans = 0;
        while (a>0) {
            a/=10;
            ans++;
        }
        return ans;
    } int ans = 0; ans 0 while (a>0) {
            a/=10;
            ans++;
        } a>0 a 0 {
            a/=10;
            ans++;
        } a/=10 a 10 ans++ ans return ans; ans long a a public class Main {

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

        long digits = Integer.MAX_VALUE;
        for (long i = 1; i*i <= n; i++) {
            if (n % i != 0) continue;

            long tmpB = n/i;
            int tmpDigits = Math.max(digitsCount(i), digitsCount(tmpB));

            if (digits > tmpDigits) digits = tmpDigits;
        }

        System.out.println(digits);
    }

    public static int digitsCount(long a) {
        int ans = 0;
        while (a>0) {
            a/=10;
            ans++;
        }
        return ans;
    }
} public class Main {

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

        long digits = Integer.MAX_VALUE;
        for (long i = 1; i*i <= n; i++) {
            if (n % i != 0) continue;

            long tmpB = n/i;
            int tmpDigits = Math.max(digitsCount(i), digitsCount(tmpB));

            if (digits > tmpDigits) digits = tmpDigits;
        }

        System.out.println(digits);
    }

    public static int digitsCount(long a) {
        int ans = 0;
        while (a>0) {
            a/=10;
            ans++;
        }
        return ans;
    }
} Main
import java.util.*;

public class Main {

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

        long digits = Integer.MAX_VALUE;
        for (long i = 1; i*i <= n; i++) {
            if (n % i != 0) continue;

            long tmpB = n/i;
            int tmpDigits = Math.max(digitsCount(i), digitsCount(tmpB));

            if (digits > tmpDigits) digits = tmpDigits;
        }

        System.out.println(digits);
    }

    public static int digitsCount(long a) {
        int ans = 0;
        while (a>0) {
            a/=10;
            ans++;
        }
        return ans;
    }
}
