import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        long n = Long.parseLong(sc.next());
        
        //String s = sc.next();
        
        int a = (int)Math.sqrt(n);
        long b=0;
        int M=0;
        while(M==0){
            if(n%a==0){
                b=n/a;
                M=get_digit(b);
            }
            a--;
        }
        System.out.println(M);
    }
    private static int get_digit(long num){
        if(num<10){
            return 1;
        }else if(num<100){
            return 2;
        }else if(num<1000){
            return 3;
        }else if(num<10000){
            return 4;
        }else if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        long n = Long.parseLong(sc.next());
        
        //String s = sc.next();
        
        int a = (int)Math.sqrt(n);
        long b=0;
        int M=0;
        while(M==0){
            if(n%a==0){
                b=n/a;
                M=get_digit(b);
            }
            a--;
        }
        System.out.println(M);
    }
    private static int get_digit(long num){
        if(num<10){
            return 1;
        }else if(num<100){
            return 2;
        }else if(num<1000){
            return 3;
        }else if(num<10000){
            return 4;
        }else if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        long n = Long.parseLong(sc.next());
        
        //String s = sc.next();
        
        int a = (int)Math.sqrt(n);
        long b=0;
        int M=0;
        while(M==0){
            if(n%a==0){
                b=n/a;
                M=get_digit(b);
            }
            a--;
        }
        System.out.println(M);
    } main {
        Scanner sc = new Scanner(System.in);
        
        long n = Long.parseLong(sc.next());
        
        //String s = sc.next();
        
        int a = (int)Math.sqrt(n);
        long b=0;
        int M=0;
        while(M==0){
            if(n%a==0){
                b=n/a;
                M=get_digit(b);
            }
            a--;
        }
        System.out.println(M);
    } 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 int a = (int)Math.sqrt(n); a (int)Math.sqrt(n) Math.sqrt Math n long b=0; b 0 int M=0; M 0 while(M==0){
            if(n%a==0){
                b=n/a;
                M=get_digit(b);
            }
            a--;
        } M==0 M 0 {
            if(n%a==0){
                b=n/a;
                M=get_digit(b);
            }
            a--;
        } if(n%a==0){
                b=n/a;
                M=get_digit(b);
            } n%a==0 n%a n a 0 {
                b=n/a;
                M=get_digit(b);
            } b=n/a b n/a n a M=get_digit(b) M get_digit(b) get_digit b a-- a System.out.println(M) System.out.println System.out System System.out M String[] args args private static int get_digit(long num){
        if(num<10){
            return 1;
        }else if(num<100){
            return 2;
        }else if(num<1000){
            return 3;
        }else if(num<10000){
            return 4;
        }else if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        }
    } get_digit {
        if(num<10){
            return 1;
        }else if(num<100){
            return 2;
        }else if(num<1000){
            return 3;
        }else if(num<10000){
            return 4;
        }else if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        }
    } if(num<10){
            return 1;
        }else if(num<100){
            return 2;
        }else if(num<1000){
            return 3;
        }else if(num<10000){
            return 4;
        }else if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        } num<10 num 10 {
            return 1;
        } return 1; 1 if(num<100){
            return 2;
        }else if(num<1000){
            return 3;
        }else if(num<10000){
            return 4;
        }else if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        } num<100 num 100 {
            return 2;
        } return 2; 2 if(num<1000){
            return 3;
        }else if(num<10000){
            return 4;
        }else if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        } num<1000 num 1000 {
            return 3;
        } return 3; 3 if(num<10000){
            return 4;
        }else if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        } num<10000 num 10000 {
            return 4;
        } return 4; 4 if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        } num<100000 num 100000 {
            return 5;
        } return 5; 5 if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        } num<1000000 num 1000000 {
            return 6;
        } return 6; 6 if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        } num<10000000 num 10000000 {
            return 7;
        } return 7; 7 if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        } num<100000000 num 100000000 {
            return 8;
        } return 8; 8 if(num<1000000000){
            return 9;
        }else{
            return 10;
        } num<1000000000 num 1000000000 {
            return 9;
        } return 9; 9 {
            return 10;
        } return 10; 10 long num num public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        long n = Long.parseLong(sc.next());
        
        //String s = sc.next();
        
        int a = (int)Math.sqrt(n);
        long b=0;
        int M=0;
        while(M==0){
            if(n%a==0){
                b=n/a;
                M=get_digit(b);
            }
            a--;
        }
        System.out.println(M);
    }
    private static int get_digit(long num){
        if(num<10){
            return 1;
        }else if(num<100){
            return 2;
        }else if(num<1000){
            return 3;
        }else if(num<10000){
            return 4;
        }else if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        long n = Long.parseLong(sc.next());
        
        //String s = sc.next();
        
        int a = (int)Math.sqrt(n);
        long b=0;
        int M=0;
        while(M==0){
            if(n%a==0){
                b=n/a;
                M=get_digit(b);
            }
            a--;
        }
        System.out.println(M);
    }
    private static int get_digit(long num){
        if(num<10){
            return 1;
        }else if(num<100){
            return 2;
        }else if(num<1000){
            return 3;
        }else if(num<10000){
            return 4;
        }else if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        long n = Long.parseLong(sc.next());
        
        //String s = sc.next();
        
        int a = (int)Math.sqrt(n);
        long b=0;
        int M=0;
        while(M==0){
            if(n%a==0){
                b=n/a;
                M=get_digit(b);
            }
            a--;
        }
        System.out.println(M);
    }
    private static int get_digit(long num){
        if(num<10){
            return 1;
        }else if(num<100){
            return 2;
        }else if(num<1000){
            return 3;
        }else if(num<10000){
            return 4;
        }else if(num<100000){
            return 5;
        }else if(num<1000000){
            return 6;
        }else if(num<10000000){
            return 7;
        }else if(num<100000000){
            return 8;
        }else if(num<1000000000){
            return 9;
        }else{
            return 10;
        }
    }
}