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

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

        int sum=0;
        Long a = stdIn.nextLong();
        int valLen = String.valueOf( a ).length();
        int max;
        for(long i=1; i*i<=a; i++){
            if(a % i == 0){
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            }
        }
        System.out.println(valLen);

    }
    } import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        int sum=0;
        Long a = stdIn.nextLong();
        int valLen = String.valueOf( a ).length();
        int max;
        for(long i=1; i*i<=a; i++){
            if(a % i == 0){
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            }
        }
        System.out.println(valLen);

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

        int sum=0;
        Long a = stdIn.nextLong();
        int valLen = String.valueOf( a ).length();
        int max;
        for(long i=1; i*i<=a; i++){
            if(a % i == 0){
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            }
        }
        System.out.println(valLen);

    } main {
        Scanner stdIn = new Scanner(System.in);

        int sum=0;
        Long a = stdIn.nextLong();
        int valLen = String.valueOf( a ).length();
        int max;
        for(long i=1; i*i<=a; i++){
            if(a % i == 0){
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            }
        }
        System.out.println(valLen);

    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int sum=0; sum 0 Long a = stdIn.nextLong(); a stdIn.nextLong() stdIn.nextLong stdIn int valLen = String.valueOf( a ).length(); valLen String.valueOf( a ).length() String.valueOf( a ).length String.valueOf( a ) String.valueOf String a int max; max for(long i=1; i*i<=a; i++){
            if(a % i == 0){
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            }
        } long i=1; long i=1; i 1 i*i<=a i*i i i a i++ i++ i {
            if(a % i == 0){
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            }
        } {
            if(a % i == 0){
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            }
        } if(a % i == 0){
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            } a % i == 0 a % i a i 0 {
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            } long b = a/i; b a/i a i if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                } b>i b i {
                    max = String.valueOf( b ).length();

                } max = String.valueOf( b ).length() max String.valueOf( b ).length() String.valueOf( b ).length String.valueOf( b ) String.valueOf String b {

                    max = String.valueOf( i ).length();
                } max = String.valueOf( i ).length() max String.valueOf( i ).length() String.valueOf( i ).length String.valueOf( i ) String.valueOf String i if(max<valLen){
                    valLen = max;
                } max<valLen max valLen {
                    valLen = max;
                } valLen = max valLen max System.out.println(valLen) System.out.println System.out System System.out valLen String[] args args public class Main {
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        int sum=0;
        Long a = stdIn.nextLong();
        int valLen = String.valueOf( a ).length();
        int max;
        for(long i=1; i*i<=a; i++){
            if(a % i == 0){
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            }
        }
        System.out.println(valLen);

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

        int sum=0;
        Long a = stdIn.nextLong();
        int valLen = String.valueOf( a ).length();
        int max;
        for(long i=1; i*i<=a; i++){
            if(a % i == 0){
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            }
        }
        System.out.println(valLen);

    }
    } Main
import java.util.ArrayList;
import java.util.Scanner;

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

        int sum=0;
        Long a = stdIn.nextLong();
        int valLen = String.valueOf( a ).length();
        int max;
        for(long i=1; i*i<=a; i++){
            if(a % i == 0){
                long b = a/i;
                if(b>i){
                    max = String.valueOf( b ).length();

                }else{

                    max = String.valueOf( i ).length();
                }
                if(max<valLen){
                    valLen = max;
                }


            }
        }
        System.out.println(valLen);

    }
    }