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

        long N = scan.nextLong();

        long A;
        long B;

        int ans=20;

        for(long i=1; i<=Math.sqrt(N); i++){
            int a=0; //Ａの桁数
            int b=0; //Ｂの桁数
            int tmp;
            if(N%i == 0){
                A = i;
                B = N/A;
            }else{
                continue;
            }
            while(A>0){
                A = A/10;
                a++;
            }
            while(B>0){
                B = B/10;
                b++;
            }
            tmp = Math.max(a,b);
            ans = Math.min(ans,tmp);
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();

        long A;
        long B;

        int ans=20;

        for(long i=1; i<=Math.sqrt(N); i++){
            int a=0; //Ａの桁数
            int b=0; //Ｂの桁数
            int tmp;
            if(N%i == 0){
                A = i;
                B = N/A;
            }else{
                continue;
            }
            while(A>0){
                A = A/10;
                a++;
            }
            while(B>0){
                B = B/10;
                b++;
            }
            tmp = Math.max(a,b);
            ans = Math.min(ans,tmp);
        }
        System.out.println(ans);
    }
} Main public static void main(String args[]){
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();

        long A;
        long B;

        int ans=20;

        for(long i=1; i<=Math.sqrt(N); i++){
            int a=0; //Ａの桁数
            int b=0; //Ｂの桁数
            int tmp;
            if(N%i == 0){
                A = i;
                B = N/A;
            }else{
                continue;
            }
            while(A>0){
                A = A/10;
                a++;
            }
            while(B>0){
                B = B/10;
                b++;
            }
            tmp = Math.max(a,b);
            ans = Math.min(ans,tmp);
        }
        System.out.println(ans);
    } main {
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();

        long A;
        long B;

        int ans=20;

        for(long i=1; i<=Math.sqrt(N); i++){
            int a=0; //Ａの桁数
            int b=0; //Ｂの桁数
            int tmp;
            if(N%i == 0){
                A = i;
                B = N/A;
            }else{
                continue;
            }
            while(A>0){
                A = A/10;
                a++;
            }
            while(B>0){
                B = B/10;
                b++;
            }
            tmp = Math.max(a,b);
            ans = Math.min(ans,tmp);
        }
        System.out.println(ans);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long N = scan.nextLong(); N scan.nextLong() scan.nextLong scan long A; A long B; B int ans=20; ans 20 for(long i=1; i<=Math.sqrt(N); i++){
            int a=0; //Ａの桁数
            int b=0; //Ｂの桁数
            int tmp;
            if(N%i == 0){
                A = i;
                B = N/A;
            }else{
                continue;
            }
            while(A>0){
                A = A/10;
                a++;
            }
            while(B>0){
                B = B/10;
                b++;
            }
            tmp = Math.max(a,b);
            ans = Math.min(ans,tmp);
        } long i=1; long i=1; i 1 i<=Math.sqrt(N) i Math.sqrt(N) Math.sqrt Math N i++ i++ i {
            int a=0; //Ａの桁数
            int b=0; //Ｂの桁数
            int tmp;
            if(N%i == 0){
                A = i;
                B = N/A;
            }else{
                continue;
            }
            while(A>0){
                A = A/10;
                a++;
            }
            while(B>0){
                B = B/10;
                b++;
            }
            tmp = Math.max(a,b);
            ans = Math.min(ans,tmp);
        } {
            int a=0; //Ａの桁数
            int b=0; //Ｂの桁数
            int tmp;
            if(N%i == 0){
                A = i;
                B = N/A;
            }else{
                continue;
            }
            while(A>0){
                A = A/10;
                a++;
            }
            while(B>0){
                B = B/10;
                b++;
            }
            tmp = Math.max(a,b);
            ans = Math.min(ans,tmp);
        } int a=0; a 0 int b=0; b 0 int tmp; tmp if(N%i == 0){
                A = i;
                B = N/A;
            }else{
                continue;
            } N%i == 0 N%i N i 0 {
                A = i;
                B = N/A;
            } A = i A i B = N/A B N/A N A {
                continue;
            } continue; while(A>0){
                A = A/10;
                a++;
            } A>0 A 0 {
                A = A/10;
                a++;
            } A = A/10 A A/10 A 10 a++ a while(B>0){
                B = B/10;
                b++;
            } B>0 B 0 {
                B = B/10;
                b++;
            } B = B/10 B B/10 B 10 b++ b tmp = Math.max(a,b) tmp Math.max(a,b) Math.max Math a b ans = Math.min(ans,tmp) ans Math.min(ans,tmp) Math.min Math ans tmp 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[]){
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();

        long A;
        long B;

        int ans=20;

        for(long i=1; i<=Math.sqrt(N); i++){
            int a=0; //Ａの桁数
            int b=0; //Ｂの桁数
            int tmp;
            if(N%i == 0){
                A = i;
                B = N/A;
            }else{
                continue;
            }
            while(A>0){
                A = A/10;
                a++;
            }
            while(B>0){
                B = B/10;
                b++;
            }
            tmp = Math.max(a,b);
            ans = Math.min(ans,tmp);
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();

        long A;
        long B;

        int ans=20;

        for(long i=1; i<=Math.sqrt(N); i++){
            int a=0; //Ａの桁数
            int b=0; //Ｂの桁数
            int tmp;
            if(N%i == 0){
                A = i;
                B = N/A;
            }else{
                continue;
            }
            while(A>0){
                A = A/10;
                a++;
            }
            while(B>0){
                B = B/10;
                b++;
            }
            tmp = Math.max(a,b);
            ans = Math.min(ans,tmp);
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();

        long A;
        long B;

        int ans=20;

        for(long i=1; i<=Math.sqrt(N); i++){
            int a=0; //Ａの桁数
            int b=0; //Ｂの桁数
            int tmp;
            if(N%i == 0){
                A = i;
                B = N/A;
            }else{
                continue;
            }
            while(A>0){
                A = A/10;
                a++;
            }
            while(B>0){
                B = B/10;
                b++;
            }
            tmp = Math.max(a,b);
            ans = Math.min(ans,tmp);
        }
        System.out.println(ans);
    }
}