import java.util.Scanner;

public class Main {

    static long fanc(long a, long b) {
        long fa = 0, fb = 0;
        while(a != 0) {
            a /= 10;
            fa++;
        }
        while(b != 0) {
            b /= 10;
            fb++;
        }
        return ((fa < fb) ? fb : fa);
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();
        long a,b,min = N;

        for(a = 1; a <= Math.sqrt(N); a++) {
            if(N%a!=0) {
                continue;
            }
            b = N/a;
            min = (min < fanc(a, b) ? min : fanc(a, b));
            //System.out.println(a + " " + b + " " + min);
        }

        System.out.println(min);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    static long fanc(long a, long b) {
        long fa = 0, fb = 0;
        while(a != 0) {
            a /= 10;
            fa++;
        }
        while(b != 0) {
            b /= 10;
            fb++;
        }
        return ((fa < fb) ? fb : fa);
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();
        long a,b,min = N;

        for(a = 1; a <= Math.sqrt(N); a++) {
            if(N%a!=0) {
                continue;
            }
            b = N/a;
            min = (min < fanc(a, b) ? min : fanc(a, b));
            //System.out.println(a + " " + b + " " + min);
        }

        System.out.println(min);
    }
} Main static long fanc(long a, long b) {
        long fa = 0, fb = 0;
        while(a != 0) {
            a /= 10;
            fa++;
        }
        while(b != 0) {
            b /= 10;
            fb++;
        }
        return ((fa < fb) ? fb : fa);
    } fanc {
        long fa = 0, fb = 0;
        while(a != 0) {
            a /= 10;
            fa++;
        }
        while(b != 0) {
            b /= 10;
            fb++;
        }
        return ((fa < fb) ? fb : fa);
    } long fa = 0 fa 0 fb = 0; fb 0 while(a != 0) {
            a /= 10;
            fa++;
        } a != 0 a 0 {
            a /= 10;
            fa++;
        } a /= 10 a 10 fa++ fa while(b != 0) {
            b /= 10;
            fb++;
        } b != 0 b 0 {
            b /= 10;
            fb++;
        } b /= 10 b 10 fb++ fb return ((fa < fb) ? fb : fa); ((fa < fb) ? fb : fa) (fa < fb) fa fb fb fa long a a long b b public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();
        long a,b,min = N;

        for(a = 1; a <= Math.sqrt(N); a++) {
            if(N%a!=0) {
                continue;
            }
            b = N/a;
            min = (min < fanc(a, b) ? min : fanc(a, b));
            //System.out.println(a + " " + b + " " + min);
        }

        System.out.println(min);
    } main {
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();
        long a,b,min = N;

        for(a = 1; a <= Math.sqrt(N); a++) {
            if(N%a!=0) {
                continue;
            }
            b = N/a;
            min = (min < fanc(a, b) ? min : fanc(a, b));
            //System.out.println(a + " " + b + " " + min);
        }

        System.out.println(min);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long N = scan.nextLong(); N scan.nextLong() scan.nextLong scan long a a b b min = N; min N for(a = 1; a <= Math.sqrt(N); a++) {
            if(N%a!=0) {
                continue;
            }
            b = N/a;
            min = (min < fanc(a, b) ? min : fanc(a, b));
            //System.out.println(a + " " + b + " " + min);
        } a = 1; a = 1 a 1 a <= Math.sqrt(N) a Math.sqrt(N) Math.sqrt Math N a++ a++ a {
            if(N%a!=0) {
                continue;
            }
            b = N/a;
            min = (min < fanc(a, b) ? min : fanc(a, b));
            //System.out.println(a + " " + b + " " + min);
        } {
            if(N%a!=0) {
                continue;
            }
            b = N/a;
            min = (min < fanc(a, b) ? min : fanc(a, b));
            //System.out.println(a + " " + b + " " + min);
        } if(N%a!=0) {
                continue;
            } N%a!=0 N%a N a 0 {
                continue;
            } continue; b = N/a b N/a N a min = (min < fanc(a, b) ? min : fanc(a, b)) min (min < fanc(a, b) ? min : fanc(a, b)) min < fanc(a, b) min fanc(a, b) fanc a b min fanc(a, b) fanc a b System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {

    static long fanc(long a, long b) {
        long fa = 0, fb = 0;
        while(a != 0) {
            a /= 10;
            fa++;
        }
        while(b != 0) {
            b /= 10;
            fb++;
        }
        return ((fa < fb) ? fb : fa);
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();
        long a,b,min = N;

        for(a = 1; a <= Math.sqrt(N); a++) {
            if(N%a!=0) {
                continue;
            }
            b = N/a;
            min = (min < fanc(a, b) ? min : fanc(a, b));
            //System.out.println(a + " " + b + " " + min);
        }

        System.out.println(min);
    }
} public class Main {

    static long fanc(long a, long b) {
        long fa = 0, fb = 0;
        while(a != 0) {
            a /= 10;
            fa++;
        }
        while(b != 0) {
            b /= 10;
            fb++;
        }
        return ((fa < fb) ? fb : fa);
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();
        long a,b,min = N;

        for(a = 1; a <= Math.sqrt(N); a++) {
            if(N%a!=0) {
                continue;
            }
            b = N/a;
            min = (min < fanc(a, b) ? min : fanc(a, b));
            //System.out.println(a + " " + b + " " + min);
        }

        System.out.println(min);
    }
} Main
import java.util.Scanner;

public class Main {

    static long fanc(long a, long b) {
        long fa = 0, fb = 0;
        while(a != 0) {
            a /= 10;
            fa++;
        }
        while(b != 0) {
            b /= 10;
            fb++;
        }
        return ((fa < fb) ? fb : fa);
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        long N = scan.nextLong();
        long a,b,min = N;

        for(a = 1; a <= Math.sqrt(N); a++) {
            if(N%a!=0) {
                continue;
            }
            b = N/a;
            min = (min < fanc(a, b) ? min : fanc(a, b));
            //System.out.println(a + " " + b + " " + min);
        }

        System.out.println(min);
    }
}