
import java.util.*;
import java.util.regex.Matcher;

/**
 * Created by Seiya on 2016/10/16.
 */

public class Main {

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

        long N = scanner.nextLong();

        ArrayList<Long> list = new ArrayList<Long>();
        long i = 1;
        double last = Math.sqrt(N);
        while(true){
            if(N % i == 0){
                list.add(N / i);
            }
            if(i > last)break;
            i++;
        }

        long ans = 99999999;
        for (int j = 0; j < list.size(); j++) {
            int temp = Math.max(log10(list.get(j)), log10(N / list.get(j)));
            ans = Math.min(ans, temp);
        }
        System.out.println(ans);


    } // mainMethod

    public static int log10(long n){
        int ans = 0;
        while(n > 0){
            n /= 10;
            ans++;
        }

        return ans;
    }


} // MainClass import java.util.*; util.* java import java.util.regex.Matcher; Matcher java.util.regex public class Main {

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

        long N = scanner.nextLong();

        ArrayList<Long> list = new ArrayList<Long>();
        long i = 1;
        double last = Math.sqrt(N);
        while(true){
            if(N % i == 0){
                list.add(N / i);
            }
            if(i > last)break;
            i++;
        }

        long ans = 99999999;
        for (int j = 0; j < list.size(); j++) {
            int temp = Math.max(log10(list.get(j)), log10(N / list.get(j)));
            ans = Math.min(ans, temp);
        }
        System.out.println(ans);


    } // mainMethod

    public static int log10(long n){
        int ans = 0;
        while(n > 0){
            n /= 10;
            ans++;
        }

        return ans;
    }


} // MainClass Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        long N = scanner.nextLong();

        ArrayList<Long> list = new ArrayList<Long>();
        long i = 1;
        double last = Math.sqrt(N);
        while(true){
            if(N % i == 0){
                list.add(N / i);
            }
            if(i > last)break;
            i++;
        }

        long ans = 99999999;
        for (int j = 0; j < list.size(); j++) {
            int temp = Math.max(log10(list.get(j)), log10(N / list.get(j)));
            ans = Math.min(ans, temp);
        }
        System.out.println(ans);


    } // mainMethod main {
        Scanner scanner = new Scanner(System.in);

        long N = scanner.nextLong();

        ArrayList<Long> list = new ArrayList<Long>();
        long i = 1;
        double last = Math.sqrt(N);
        while(true){
            if(N % i == 0){
                list.add(N / i);
            }
            if(i > last)break;
            i++;
        }

        long ans = 99999999;
        for (int j = 0; j < list.size(); j++) {
            int temp = Math.max(log10(list.get(j)), log10(N / list.get(j)));
            ans = Math.min(ans, temp);
        }
        System.out.println(ans);


    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long N = scanner.nextLong(); N scanner.nextLong() scanner.nextLong scanner ArrayList<Long> list = new ArrayList<Long>(); list new ArrayList<Long>() long i = 1; i 1 double last = Math.sqrt(N); last Math.sqrt(N) Math.sqrt Math N while(true){
            if(N % i == 0){
                list.add(N / i);
            }
            if(i > last)break;
            i++;
        } true {
            if(N % i == 0){
                list.add(N / i);
            }
            if(i > last)break;
            i++;
        } if(N % i == 0){
                list.add(N / i);
            } N % i == 0 N % i N i 0 {
                list.add(N / i);
            } list.add(N / i) list.add list N / i N i if(i > last)break; i > last i last break; i++ i long ans = 99999999; ans 99999999 for (int j = 0; j < list.size(); j++) {
            int temp = Math.max(log10(list.get(j)), log10(N / list.get(j)));
            ans = Math.min(ans, temp);
        } int j = 0; int j = 0; j 0 j < list.size() j list.size() list.size list j++ j++ j {
            int temp = Math.max(log10(list.get(j)), log10(N / list.get(j)));
            ans = Math.min(ans, temp);
        } {
            int temp = Math.max(log10(list.get(j)), log10(N / list.get(j)));
            ans = Math.min(ans, temp);
        } int temp = Math.max(log10(list.get(j)), log10(N / list.get(j))); temp Math.max(log10(list.get(j)), log10(N / list.get(j))) Math.max Math log10(list.get(j)) log10 list.get(j) list.get list j log10(N / list.get(j)) log10 N / list.get(j) N list.get(j) list.get list j ans = Math.min(ans, temp) ans Math.min(ans, temp) Math.min Math ans temp System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static int log10(long n){
        int ans = 0;
        while(n > 0){
            n /= 10;
            ans++;
        }

        return ans;
    } log10 {
        int ans = 0;
        while(n > 0){
            n /= 10;
            ans++;
        }

        return ans;
    } int ans = 0; ans 0 while(n > 0){
            n /= 10;
            ans++;
        } n > 0 n 0 {
            n /= 10;
            ans++;
        } n /= 10 n 10 ans++ ans return ans; ans long n n public class Main {

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

        long N = scanner.nextLong();

        ArrayList<Long> list = new ArrayList<Long>();
        long i = 1;
        double last = Math.sqrt(N);
        while(true){
            if(N % i == 0){
                list.add(N / i);
            }
            if(i > last)break;
            i++;
        }

        long ans = 99999999;
        for (int j = 0; j < list.size(); j++) {
            int temp = Math.max(log10(list.get(j)), log10(N / list.get(j)));
            ans = Math.min(ans, temp);
        }
        System.out.println(ans);


    } // mainMethod

    public static int log10(long n){
        int ans = 0;
        while(n > 0){
            n /= 10;
            ans++;
        }

        return ans;
    }


} // MainClass public class Main {

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

        long N = scanner.nextLong();

        ArrayList<Long> list = new ArrayList<Long>();
        long i = 1;
        double last = Math.sqrt(N);
        while(true){
            if(N % i == 0){
                list.add(N / i);
            }
            if(i > last)break;
            i++;
        }

        long ans = 99999999;
        for (int j = 0; j < list.size(); j++) {
            int temp = Math.max(log10(list.get(j)), log10(N / list.get(j)));
            ans = Math.min(ans, temp);
        }
        System.out.println(ans);


    } // mainMethod

    public static int log10(long n){
        int ans = 0;
        while(n > 0){
            n /= 10;
            ans++;
        }

        return ans;
    }


} // MainClass Main

import java.util.*;
import java.util.regex.Matcher;

/**
 * Created by Seiya on 2016/10/16.
 */

public class Main {

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

        long N = scanner.nextLong();

        ArrayList<Long> list = new ArrayList<Long>();
        long i = 1;
        double last = Math.sqrt(N);
        while(true){
            if(N % i == 0){
                list.add(N / i);
            }
            if(i > last)break;
            i++;
        }

        long ans = 99999999;
        for (int j = 0; j < list.size(); j++) {
            int temp = Math.max(log10(list.get(j)), log10(N / list.get(j)));
            ans = Math.min(ans, temp);
        }
        System.out.println(ans);


    } // mainMethod

    public static int log10(long n){
        int ans = 0;
        while(n > 0){
            n /= 10;
            ans++;
        }

        return ans;
    }


} // MainClass
