import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                long n = sc.nextLong();
                sc.close();
                long fia = 0;
                long fkh = 0;
                int yono = (int)Math.log10(n);
                for(int i = 2 ; i <= Math.sqrt(n) ; i++){
                        if(n % i == 0){
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        }
                }
                System.out.println(yono + 1);
        }
} import java.util.*; util.* java public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                long n = sc.nextLong();
                sc.close();
                long fia = 0;
                long fkh = 0;
                int yono = (int)Math.log10(n);
                for(int i = 2 ; i <= Math.sqrt(n) ; i++){
                        if(n % i == 0){
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        }
                }
                System.out.println(yono + 1);
        }
} Main public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                long n = sc.nextLong();
                sc.close();
                long fia = 0;
                long fkh = 0;
                int yono = (int)Math.log10(n);
                for(int i = 2 ; i <= Math.sqrt(n) ; i++){
                        if(n % i == 0){
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        }
                }
                System.out.println(yono + 1);
        } main {
                Scanner sc = new Scanner(System.in);
                long n = sc.nextLong();
                sc.close();
                long fia = 0;
                long fkh = 0;
                int yono = (int)Math.log10(n);
                for(int i = 2 ; i <= Math.sqrt(n) ; i++){
                        if(n % i == 0){
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        }
                }
                System.out.println(yono + 1);
        } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc sc.close() sc.close sc long fia = 0; fia 0 long fkh = 0; fkh 0 int yono = (int)Math.log10(n); yono (int)Math.log10(n) Math.log10 Math n for(int i = 2 ; i <= Math.sqrt(n) ; i++){
                        if(n % i == 0){
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        }
                } int i = 2 ; int i = 2 ; i 2 i <= Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
                        if(n % i == 0){
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        }
                } {
                        if(n % i == 0){
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        }
                } if(n % i == 0){
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        } n % i == 0 n % i n i 0 {
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        } fia = n / i fia n / i n i fkh = i fkh i yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh))) yono Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh))) Math.min Math yono Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)) Math.max Math (int)Math.log10(fia) Math.log10 Math fia (int)Math.log10(fkh) Math.log10 Math fkh System.out.println(yono + 1) System.out.println System.out System System.out yono + 1 yono 1 String[] args args public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                long n = sc.nextLong();
                sc.close();
                long fia = 0;
                long fkh = 0;
                int yono = (int)Math.log10(n);
                for(int i = 2 ; i <= Math.sqrt(n) ; i++){
                        if(n % i == 0){
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        }
                }
                System.out.println(yono + 1);
        }
} public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                long n = sc.nextLong();
                sc.close();
                long fia = 0;
                long fkh = 0;
                int yono = (int)Math.log10(n);
                for(int i = 2 ; i <= Math.sqrt(n) ; i++){
                        if(n % i == 0){
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        }
                }
                System.out.println(yono + 1);
        }
} Main
import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                long n = sc.nextLong();
                sc.close();
                long fia = 0;
                long fkh = 0;
                int yono = (int)Math.log10(n);
                for(int i = 2 ; i <= Math.sqrt(n) ; i++){
                        if(n % i == 0){
                                fia = n / i;
                                fkh = i;
                                yono = Math.min(yono , Math.max((int)Math.log10(fia) , (int)Math.log10(fkh)));
                        }
                }
                System.out.println(yono + 1);
        }
}