import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

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

        final long n = sc.nextLong();

        List<Long> divisors = new ArrayList<>();

        int ans = Integer.MAX_VALUE;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

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

        final long n = sc.nextLong();

        List<Long> divisors = new ArrayList<>();

        int ans = Integer.MAX_VALUE;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final long n = sc.nextLong();

        List<Long> divisors = new ArrayList<>();

        int ans = Integer.MAX_VALUE;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    } main {
        final Scanner sc = new Scanner(System.in);

        final long n = sc.nextLong();

        List<Long> divisors = new ArrayList<>();

        int ans = Integer.MAX_VALUE;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc List<Long> divisors = new ArrayList<>(); divisors new ArrayList<>() int ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            }
        } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
            if (n % i == 0) {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            }
        } {
            if (n % i == 0) {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            }
        } if (n % i == 0) {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            } n % i == 0 n % i n i 0 {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            } final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()); f Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()) Math.max Math String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i String.valueOf(n/i).length() String.valueOf(n/i).length String.valueOf(n/i) String.valueOf String n/i n i ans = Math.min(ans, f) ans Math.min(ans, f) Math.min Math ans f System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

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

        final long n = sc.nextLong();

        List<Long> divisors = new ArrayList<>();

        int ans = Integer.MAX_VALUE;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    }
} public class Main {

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

        final long n = sc.nextLong();

        List<Long> divisors = new ArrayList<>();

        int ans = Integer.MAX_VALUE;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

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

        final long n = sc.nextLong();

        List<Long> divisors = new ArrayList<>();

        int ans = Integer.MAX_VALUE;

        for (long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
               final int f = Math.max(String.valueOf(i).length(), String.valueOf(n/i).length());
               ans = Math.min(ans, f);
            }
        }

        System.out.println(ans);
    }
}
