import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int r = (int) Math.ceil(Math.sqrt(n));
        long tmp = n;
        for (int i = r; i > 0; i--) {
            if(n % i == 0){
                tmp = n / i;
                break;
            }
        }
        int ans = String.valueOf(tmp).length();

        System.out.println(ans);
        sc.close();
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int r = (int) Math.ceil(Math.sqrt(n));
        long tmp = n;
        for (int i = r; i > 0; i--) {
            if(n % i == 0){
                tmp = n / i;
                break;
            }
        }
        int ans = String.valueOf(tmp).length();

        System.out.println(ans);
        sc.close();
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int r = (int) Math.ceil(Math.sqrt(n));
        long tmp = n;
        for (int i = r; i > 0; i--) {
            if(n % i == 0){
                tmp = n / i;
                break;
            }
        }
        int ans = String.valueOf(tmp).length();

        System.out.println(ans);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int r = (int) Math.ceil(Math.sqrt(n));
        long tmp = n;
        for (int i = r; i > 0; i--) {
            if(n % i == 0){
                tmp = n / i;
                break;
            }
        }
        int ans = String.valueOf(tmp).length();

        System.out.println(ans);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int r = (int) Math.ceil(Math.sqrt(n)); r (int) Math.ceil(Math.sqrt(n)) Math.ceil Math Math.sqrt(n) Math.sqrt Math n long tmp = n; tmp n for (int i = r; i > 0; i--) {
            if(n % i == 0){
                tmp = n / i;
                break;
            }
        } int i = r; int i = r; i r i > 0 i 0 i-- i-- i {
            if(n % i == 0){
                tmp = n / i;
                break;
            }
        } {
            if(n % i == 0){
                tmp = n / i;
                break;
            }
        } if(n % i == 0){
                tmp = n / i;
                break;
            } n % i == 0 n % i n i 0 {
                tmp = n / i;
                break;
            } tmp = n / i tmp n / i n i break; int ans = String.valueOf(tmp).length(); ans String.valueOf(tmp).length() String.valueOf(tmp).length String.valueOf(tmp) String.valueOf String tmp System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int r = (int) Math.ceil(Math.sqrt(n));
        long tmp = n;
        for (int i = r; i > 0; i--) {
            if(n % i == 0){
                tmp = n / i;
                break;
            }
        }
        int ans = String.valueOf(tmp).length();

        System.out.println(ans);
        sc.close();
    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int r = (int) Math.ceil(Math.sqrt(n));
        long tmp = n;
        for (int i = r; i > 0; i--) {
            if(n % i == 0){
                tmp = n / i;
                break;
            }
        }
        int ans = String.valueOf(tmp).length();

        System.out.println(ans);
        sc.close();
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int r = (int) Math.ceil(Math.sqrt(n));
        long tmp = n;
        for (int i = r; i > 0; i--) {
            if(n % i == 0){
                tmp = n / i;
                break;
            }
        }
        int ans = String.valueOf(tmp).length();

        System.out.println(ans);
        sc.close();
    }

}
