import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for(int i = (int) Math.sqrt(n); i>0; --i){
                if(n%i==0){
                    min = n/i;
                    break;
                }
        }
        System.out.println(getNums(min));
    }
    static int getNums(long n){
        int count  = 0;
        while(n>0){
            n /= 10;
            count++;
        }
        return count;
    }
} 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();
        long min = 0;
        for(int i = (int) Math.sqrt(n); i>0; --i){
                if(n%i==0){
                    min = n/i;
                    break;
                }
        }
        System.out.println(getNums(min));
    }
    static int getNums(long n){
        int count  = 0;
        while(n>0){
            n /= 10;
            count++;
        }
        return count;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for(int i = (int) Math.sqrt(n); i>0; --i){
                if(n%i==0){
                    min = n/i;
                    break;
                }
        }
        System.out.println(getNums(min));
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for(int i = (int) Math.sqrt(n); i>0; --i){
                if(n%i==0){
                    min = n/i;
                    break;
                }
        }
        System.out.println(getNums(min));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long min = 0; min 0 for(int i = (int) Math.sqrt(n); i>0; --i){
                if(n%i==0){
                    min = n/i;
                    break;
                }
        } int i = (int) Math.sqrt(n); int i = (int) Math.sqrt(n); i (int) Math.sqrt(n) Math.sqrt Math n i>0 i 0 --i --i i {
                if(n%i==0){
                    min = n/i;
                    break;
                }
        } {
                if(n%i==0){
                    min = n/i;
                    break;
                }
        } if(n%i==0){
                    min = n/i;
                    break;
                } n%i==0 n%i n i 0 {
                    min = n/i;
                    break;
                } min = n/i min n/i n i break; System.out.println(getNums(min)) System.out.println System.out System System.out getNums(min) getNums min String[] args args static int getNums(long n){
        int count  = 0;
        while(n>0){
            n /= 10;
            count++;
        }
        return count;
    } getNums {
        int count  = 0;
        while(n>0){
            n /= 10;
            count++;
        }
        return count;
    } int count  = 0; count 0 while(n>0){
            n /= 10;
            count++;
        } n>0 n 0 {
            n /= 10;
            count++;
        } n /= 10 n 10 count++ count return count; count long n n public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for(int i = (int) Math.sqrt(n); i>0; --i){
                if(n%i==0){
                    min = n/i;
                    break;
                }
        }
        System.out.println(getNums(min));
    }
    static int getNums(long n){
        int count  = 0;
        while(n>0){
            n /= 10;
            count++;
        }
        return count;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for(int i = (int) Math.sqrt(n); i>0; --i){
                if(n%i==0){
                    min = n/i;
                    break;
                }
        }
        System.out.println(getNums(min));
    }
    static int getNums(long n){
        int count  = 0;
        while(n>0){
            n /= 10;
            count++;
        }
        return count;
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = 0;
        for(int i = (int) Math.sqrt(n); i>0; --i){
                if(n%i==0){
                    min = n/i;
                    break;
                }
        }
        System.out.println(getNums(min));
    }
    static int getNums(long n){
        int count  = 0;
        while(n>0){
            n /= 10;
            count++;
        }
        return count;
    }
}