import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        long n=Long.parseLong(sc.next());
        sc.close();
        for(long a=(long) Math.sqrt(n);a>=1;a--){
            if(n%a==0){
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            }
        }
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        long n=Long.parseLong(sc.next());
        sc.close();
        for(long a=(long) Math.sqrt(n);a>=1;a--){
            if(n%a==0){
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            }
        }
    }
} Main public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        long n=Long.parseLong(sc.next());
        sc.close();
        for(long a=(long) Math.sqrt(n);a>=1;a--){
            if(n%a==0){
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            }
        }
    } main {
        Scanner sc=new Scanner(System.in);
        long n=Long.parseLong(sc.next());
        sc.close();
        for(long a=(long) Math.sqrt(n);a>=1;a--){
            if(n%a==0){
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            }
        }
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) long n=Long.parseLong(sc.next()); n Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc sc.close() sc.close sc for(long a=(long) Math.sqrt(n);a>=1;a--){
            if(n%a==0){
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            }
        } long a=(long) Math.sqrt(n); long a=(long) Math.sqrt(n); a (long) Math.sqrt(n) Math.sqrt Math n a>=1 a 1 a-- a-- a {
            if(n%a==0){
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            }
        } {
            if(n%a==0){
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            }
        } if(n%a==0){
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            } n%a==0 n%a n a 0 {
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            } long b=n/a; b n/a n a String b_str=Long.toString(b); b_str Long.toString(b) Long.toString Long b System.out.println(b_str.length()) System.out.println System.out System System.out b_str.length() b_str.length b_str System.exit(0) System.exit System 0 String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        long n=Long.parseLong(sc.next());
        sc.close();
        for(long a=(long) Math.sqrt(n);a>=1;a--){
            if(n%a==0){
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            }
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        long n=Long.parseLong(sc.next());
        sc.close();
        for(long a=(long) Math.sqrt(n);a>=1;a--){
            if(n%a==0){
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            }
        }
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        long n=Long.parseLong(sc.next());
        sc.close();
        for(long a=(long) Math.sqrt(n);a>=1;a--){
            if(n%a==0){
                long b=n/a;
                String b_str=Long.toString(b);
                System.out.println(b_str.length());
                System.exit(0);
            }
        }
    }
}