import java.util.*;
import java.lang.*;

class Pair<E extends Comparable<E>,F extends Comparable<F>> implements Comparable<Pair<E,F>>{
    E first;
    F second;
    public Pair(E first, F second){
        this.first=first;
        this.second=second;
    }
    public E getFirst(){return first;}
    public F getSecond(){return second;}
    public String toString(){
        return "<"+first.toString()+","+second.toString()+">";
    }
    public int hashCode(){
        return first.hashCode()*30011+second.hashCode()+2;
    }
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Pair another = (Pair) obj;
        return this.getFirst().equals(another.getFirst())&&this.getSecond().equals(another.getSecond());
    }

    public int compareTo(Pair<E,F> another){
        if(this.getFirst().equals(another.getFirst())){
            return this.getSecond().compareTo(another.getSecond());
        }
        return this.getFirst().compareTo(another.getFirst());
    }

}
class ArrayLib{
    static<E extends Comparable<E>> E getOrDefault(E[] array, int index, E defaultValue){
        if(index<0 || index>=array.length) return defaultValue;
        return array[index];
    }

    static<E extends Comparable<E>> int maxIndexOfArray(E[] a){
        int ans = 0;
        for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])>0) ans=i;
        }
        return ans;
    }
    static<E extends Comparable<E>> int minIndexOfArray(E[] a){
        int ans = 0;
        for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])<0) ans=i;
        }
        return ans;
    }

    // minimum x st. array[x] >= elm
    static<E extends Comparable<E>> int lowerBound(E[] array, E elm){
        if(array[0].compareTo(elm)>=0) return 0;
        int min = 0, max = array.length;
        // array[min] < elm
        // array[max] >= elm
        while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) < 0) min = mid;
            else max = mid;
        }
        return max;
    }
    // minimum x st. array[x] > elm
    static<E extends Comparable<E>> int upperBound(E[] array, E elm){
        if(array[0].compareTo(elm)>0) return 0;
        int min = 0, max = array.length;
        // array[min] <= elm
        // array[max] > elm
        while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) <= 0) min = mid;
            else max = mid;
        }
        return max;
    }

    static boolean nextPermutation(List<Integer> list){
        int pivotPos = -1;
        int pivot = 0;
        for (int i=list.size()-2; i>=0; i--) {
            if (list.get(i) < list.get(i+1)) {
                pivotPos = i;
                pivot = list.get(i);
                break;
            }
        }

        if (pivotPos==-1 && pivot==0) return false;

        int L = pivotPos+1, R = list.size()-1;
        int minPos = -1;
        int min = Integer.MAX_VALUE;
        for (int i=R; i>=L; i--) {
            if (pivot < list.get(i)) {
                if (list.get(i) < min) {
                    min = list.get(i);
                    minPos = i;
                }
            }
        }

        Collections.swap(list, pivotPos, minPos);
        Collections.sort(list.subList(L, R+1));

        StringBuilder sb = new StringBuilder();
        for (int i=0; i<list.size(); i++) sb.append(list.get(i));

        return true;
    }
}

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int ans = 100;
        for(long n=1; n*n<=N; n++) if(N%n==0){
            ans = Math.min(ans, Long.toString(N/n).length());
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java class Pair<E extends Comparable<E>,F extends Comparable<F>> implements Comparable<Pair<E,F>>{
    E first;
    F second;
    public Pair(E first, F second){
        this.first=first;
        this.second=second;
    }
    public E getFirst(){return first;}
    public F getSecond(){return second;}
    public String toString(){
        return "<"+first.toString()+","+second.toString()+">";
    }
    public int hashCode(){
        return first.hashCode()*30011+second.hashCode()+2;
    }
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Pair another = (Pair) obj;
        return this.getFirst().equals(another.getFirst())&&this.getSecond().equals(another.getSecond());
    }

    public int compareTo(Pair<E,F> another){
        if(this.getFirst().equals(another.getFirst())){
            return this.getSecond().compareTo(another.getSecond());
        }
        return this.getFirst().compareTo(another.getFirst());
    }

} Pair E first; first F second; second public Pair(E first, F second){
        this.first=first;
        this.second=second;
    } Pair {
        this.first=first;
        this.second=second;
    } this.first=first this.first this this.first first this.second=second this.second this this.second second E first first F second second public E getFirst(){return first;} getFirst {return first;} return first; first public F getSecond(){return second;} getSecond {return second;} return second; second public String toString(){
        return "<"+first.toString()+","+second.toString()+">";
    } toString {
        return "<"+first.toString()+","+second.toString()+">";
    } return "<"+first.toString()+","+second.toString()+">"; "<"+first.toString()+","+second.toString()+">" second.toString() "," "<"+first.toString()+","+second.toString()+">" "<" first.toString() first.toString first "," second.toString() second.toString second ">" public int hashCode(){
        return first.hashCode()*30011+second.hashCode()+2;
    } hashCode {
        return first.hashCode()*30011+second.hashCode()+2;
    } return first.hashCode()*30011+second.hashCode()+2; first.hashCode()*30011+second.hashCode()+2 first.hashCode()*30011+second.hashCode()+2 first.hashCode()*30011 first.hashCode() first.hashCode first 30011 second.hashCode() second.hashCode second 2 public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Pair another = (Pair) obj;
        return this.getFirst().equals(another.getFirst())&&this.getSecond().equals(another.getSecond());
    } equals {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Pair another = (Pair) obj;
        return this.getFirst().equals(another.getFirst())&&this.getSecond().equals(another.getSecond());
    } if (this == obj)
            return true; this == obj this obj return true; true if (obj == null)
            return false; obj == null obj null return false; false if (getClass() != obj.getClass())
            return false; getClass() != obj.getClass() getClass() getClass obj.getClass() obj.getClass obj return false; false Pair another = (Pair) obj; another (Pair) obj return this.getFirst().equals(another.getFirst())&&this.getSecond().equals(another.getSecond()); this.getFirst().equals(another.getFirst())&&this.getSecond().equals(another.getSecond()) this.getFirst().equals(another.getFirst()) this.getFirst().equals this.getFirst() this.getFirst this another.getFirst() another.getFirst another this.getSecond().equals(another.getSecond()) this.getSecond().equals this.getSecond() this.getSecond this another.getSecond() another.getSecond another Object obj obj public int compareTo(Pair<E,F> another){
        if(this.getFirst().equals(another.getFirst())){
            return this.getSecond().compareTo(another.getSecond());
        }
        return this.getFirst().compareTo(another.getFirst());
    } compareTo {
        if(this.getFirst().equals(another.getFirst())){
            return this.getSecond().compareTo(another.getSecond());
        }
        return this.getFirst().compareTo(another.getFirst());
    } if(this.getFirst().equals(another.getFirst())){
            return this.getSecond().compareTo(another.getSecond());
        } this.getFirst().equals(another.getFirst()) this.getFirst().equals this.getFirst() this.getFirst this another.getFirst() another.getFirst another {
            return this.getSecond().compareTo(another.getSecond());
        } return this.getSecond().compareTo(another.getSecond()); this.getSecond().compareTo(another.getSecond()) this.getSecond().compareTo this.getSecond() this.getSecond this another.getSecond() another.getSecond another return this.getFirst().compareTo(another.getFirst()); this.getFirst().compareTo(another.getFirst()) this.getFirst().compareTo this.getFirst() this.getFirst this another.getFirst() another.getFirst another Pair<E,F> another another Comparable class ArrayLib{
    static<E extends Comparable<E>> E getOrDefault(E[] array, int index, E defaultValue){
        if(index<0 || index>=array.length) return defaultValue;
        return array[index];
    }

    static<E extends Comparable<E>> int maxIndexOfArray(E[] a){
        int ans = 0;
        for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])>0) ans=i;
        }
        return ans;
    }
    static<E extends Comparable<E>> int minIndexOfArray(E[] a){
        int ans = 0;
        for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])<0) ans=i;
        }
        return ans;
    }

    // minimum x st. array[x] >= elm
    static<E extends Comparable<E>> int lowerBound(E[] array, E elm){
        if(array[0].compareTo(elm)>=0) return 0;
        int min = 0, max = array.length;
        // array[min] < elm
        // array[max] >= elm
        while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) < 0) min = mid;
            else max = mid;
        }
        return max;
    }
    // minimum x st. array[x] > elm
    static<E extends Comparable<E>> int upperBound(E[] array, E elm){
        if(array[0].compareTo(elm)>0) return 0;
        int min = 0, max = array.length;
        // array[min] <= elm
        // array[max] > elm
        while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) <= 0) min = mid;
            else max = mid;
        }
        return max;
    }

    static boolean nextPermutation(List<Integer> list){
        int pivotPos = -1;
        int pivot = 0;
        for (int i=list.size()-2; i>=0; i--) {
            if (list.get(i) < list.get(i+1)) {
                pivotPos = i;
                pivot = list.get(i);
                break;
            }
        }

        if (pivotPos==-1 && pivot==0) return false;

        int L = pivotPos+1, R = list.size()-1;
        int minPos = -1;
        int min = Integer.MAX_VALUE;
        for (int i=R; i>=L; i--) {
            if (pivot < list.get(i)) {
                if (list.get(i) < min) {
                    min = list.get(i);
                    minPos = i;
                }
            }
        }

        Collections.swap(list, pivotPos, minPos);
        Collections.sort(list.subList(L, R+1));

        StringBuilder sb = new StringBuilder();
        for (int i=0; i<list.size(); i++) sb.append(list.get(i));

        return true;
    }
} ArrayLib static<E extends Comparable<E>> E getOrDefault(E[] array, int index, E defaultValue){
        if(index<0 || index>=array.length) return defaultValue;
        return array[index];
    } getOrDefault {
        if(index<0 || index>=array.length) return defaultValue;
        return array[index];
    } if(index<0 || index>=array.length) return defaultValue; index<0 || index>=array.length index<0 index 0 index>=array.length index array.length array array.length return defaultValue; defaultValue return array[index]; array[index] array index E[] array array int index index E defaultValue defaultValue static<E extends Comparable<E>> int maxIndexOfArray(E[] a){
        int ans = 0;
        for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])>0) ans=i;
        }
        return ans;
    } maxIndexOfArray {
        int ans = 0;
        for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])>0) ans=i;
        }
        return ans;
    } int ans = 0; ans 0 for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])>0) ans=i;
        } int i=1; int i=1; i 1 i<a.length i a.length a a.length i++ i++ i {
            if(a[i].compareTo(a[ans])>0) ans=i;
        } {
            if(a[i].compareTo(a[ans])>0) ans=i;
        } if(a[i].compareTo(a[ans])>0) ans=i; a[i].compareTo(a[ans])>0 a[i].compareTo(a[ans]) a[i].compareTo a[i] a i a[ans] a ans 0 ans=i ans i return ans; ans E[] a a static<E extends Comparable<E>> int minIndexOfArray(E[] a){
        int ans = 0;
        for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])<0) ans=i;
        }
        return ans;
    } minIndexOfArray {
        int ans = 0;
        for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])<0) ans=i;
        }
        return ans;
    } int ans = 0; ans 0 for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])<0) ans=i;
        } int i=1; int i=1; i 1 i<a.length i a.length a a.length i++ i++ i {
            if(a[i].compareTo(a[ans])<0) ans=i;
        } {
            if(a[i].compareTo(a[ans])<0) ans=i;
        } if(a[i].compareTo(a[ans])<0) ans=i; a[i].compareTo(a[ans])<0 a[i].compareTo(a[ans]) a[i].compareTo a[i] a i a[ans] a ans 0 ans=i ans i return ans; ans E[] a a // minimum x st. array[x] >= elm
    static<E extends Comparable<E>> int lowerBound(E[] array, E elm){
        if(array[0].compareTo(elm)>=0) return 0;
        int min = 0, max = array.length;
        // array[min] < elm
        // array[max] >= elm
        while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) < 0) min = mid;
            else max = mid;
        }
        return max;
    } lowerBound {
        if(array[0].compareTo(elm)>=0) return 0;
        int min = 0, max = array.length;
        // array[min] < elm
        // array[max] >= elm
        while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) < 0) min = mid;
            else max = mid;
        }
        return max;
    } if(array[0].compareTo(elm)>=0) return 0; array[0].compareTo(elm)>=0 array[0].compareTo(elm) array[0].compareTo array[0] array 0 elm 0 return 0; 0 int min = 0 min 0 max = array.length; max array.length array array.length while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) < 0) min = mid;
            else max = mid;
        } min+1<max min+1 min 1 max {
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) < 0) min = mid;
            else max = mid;
        } int mid = (min+max)/2; mid (min+max)/2 (min+max) min max 2 if(array[mid].compareTo(elm) < 0) min = mid;
            else max = mid; array[mid].compareTo(elm) < 0 array[mid].compareTo(elm) array[mid].compareTo array[mid] array mid elm 0 min = mid min mid max = mid max mid return max; max E[] array array E elm elm // minimum x st. array[x] > elm
    static<E extends Comparable<E>> int upperBound(E[] array, E elm){
        if(array[0].compareTo(elm)>0) return 0;
        int min = 0, max = array.length;
        // array[min] <= elm
        // array[max] > elm
        while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) <= 0) min = mid;
            else max = mid;
        }
        return max;
    } upperBound {
        if(array[0].compareTo(elm)>0) return 0;
        int min = 0, max = array.length;
        // array[min] <= elm
        // array[max] > elm
        while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) <= 0) min = mid;
            else max = mid;
        }
        return max;
    } if(array[0].compareTo(elm)>0) return 0; array[0].compareTo(elm)>0 array[0].compareTo(elm) array[0].compareTo array[0] array 0 elm 0 return 0; 0 int min = 0 min 0 max = array.length; max array.length array array.length while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) <= 0) min = mid;
            else max = mid;
        } min+1<max min+1 min 1 max {
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) <= 0) min = mid;
            else max = mid;
        } int mid = (min+max)/2; mid (min+max)/2 (min+max) min max 2 if(array[mid].compareTo(elm) <= 0) min = mid;
            else max = mid; array[mid].compareTo(elm) <= 0 array[mid].compareTo(elm) array[mid].compareTo array[mid] array mid elm 0 min = mid min mid max = mid max mid return max; max E[] array array E elm elm static boolean nextPermutation(List<Integer> list){
        int pivotPos = -1;
        int pivot = 0;
        for (int i=list.size()-2; i>=0; i--) {
            if (list.get(i) < list.get(i+1)) {
                pivotPos = i;
                pivot = list.get(i);
                break;
            }
        }

        if (pivotPos==-1 && pivot==0) return false;

        int L = pivotPos+1, R = list.size()-1;
        int minPos = -1;
        int min = Integer.MAX_VALUE;
        for (int i=R; i>=L; i--) {
            if (pivot < list.get(i)) {
                if (list.get(i) < min) {
                    min = list.get(i);
                    minPos = i;
                }
            }
        }

        Collections.swap(list, pivotPos, minPos);
        Collections.sort(list.subList(L, R+1));

        StringBuilder sb = new StringBuilder();
        for (int i=0; i<list.size(); i++) sb.append(list.get(i));

        return true;
    } nextPermutation {
        int pivotPos = -1;
        int pivot = 0;
        for (int i=list.size()-2; i>=0; i--) {
            if (list.get(i) < list.get(i+1)) {
                pivotPos = i;
                pivot = list.get(i);
                break;
            }
        }

        if (pivotPos==-1 && pivot==0) return false;

        int L = pivotPos+1, R = list.size()-1;
        int minPos = -1;
        int min = Integer.MAX_VALUE;
        for (int i=R; i>=L; i--) {
            if (pivot < list.get(i)) {
                if (list.get(i) < min) {
                    min = list.get(i);
                    minPos = i;
                }
            }
        }

        Collections.swap(list, pivotPos, minPos);
        Collections.sort(list.subList(L, R+1));

        StringBuilder sb = new StringBuilder();
        for (int i=0; i<list.size(); i++) sb.append(list.get(i));

        return true;
    } int pivotPos = -1; pivotPos -1 1 int pivot = 0; pivot 0 for (int i=list.size()-2; i>=0; i--) {
            if (list.get(i) < list.get(i+1)) {
                pivotPos = i;
                pivot = list.get(i);
                break;
            }
        } int i=list.size()-2; int i=list.size()-2; i list.size()-2 list.size() list.size list 2 i>=0 i 0 i-- i-- i {
            if (list.get(i) < list.get(i+1)) {
                pivotPos = i;
                pivot = list.get(i);
                break;
            }
        } {
            if (list.get(i) < list.get(i+1)) {
                pivotPos = i;
                pivot = list.get(i);
                break;
            }
        } if (list.get(i) < list.get(i+1)) {
                pivotPos = i;
                pivot = list.get(i);
                break;
            } list.get(i) < list.get(i+1) list.get(i) list.get list i list.get(i+1) list.get list i+1 i 1 {
                pivotPos = i;
                pivot = list.get(i);
                break;
            } pivotPos = i pivotPos i pivot = list.get(i) pivot list.get(i) list.get list i break; if (pivotPos==-1 && pivot==0) return false; pivotPos==-1 && pivot==0 pivotPos==-1 pivotPos -1 1 pivot==0 pivot 0 return false; false int L = pivotPos+1 L pivotPos+1 pivotPos 1 R = list.size()-1; R list.size()-1 list.size() list.size list 1 int minPos = -1; minPos -1 1 int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i=R; i>=L; i--) {
            if (pivot < list.get(i)) {
                if (list.get(i) < min) {
                    min = list.get(i);
                    minPos = i;
                }
            }
        } int i=R; int i=R; i R i>=L i L i-- i-- i {
            if (pivot < list.get(i)) {
                if (list.get(i) < min) {
                    min = list.get(i);
                    minPos = i;
                }
            }
        } {
            if (pivot < list.get(i)) {
                if (list.get(i) < min) {
                    min = list.get(i);
                    minPos = i;
                }
            }
        } if (pivot < list.get(i)) {
                if (list.get(i) < min) {
                    min = list.get(i);
                    minPos = i;
                }
            } pivot < list.get(i) pivot list.get(i) list.get list i {
                if (list.get(i) < min) {
                    min = list.get(i);
                    minPos = i;
                }
            } if (list.get(i) < min) {
                    min = list.get(i);
                    minPos = i;
                } list.get(i) < min list.get(i) list.get list i min {
                    min = list.get(i);
                    minPos = i;
                } min = list.get(i) min list.get(i) list.get list i minPos = i minPos i Collections.swap(list, pivotPos, minPos) Collections.swap Collections list pivotPos minPos Collections.sort(list.subList(L, R+1)) Collections.sort Collections list.subList(L, R+1) list.subList list L R+1 R 1 StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i=0; i<list.size(); i++) sb.append(list.get(i)); int i=0; int i=0; i 0 i<list.size() i list.size() list.size list i++ i++ i sb.append(list.get(i)); sb.append(list.get(i)) sb.append sb list.get(i) list.get list i return true; true List<Integer> list list public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int ans = 100;
        for(long n=1; n*n<=N; n++) if(N%n==0){
            ans = Math.min(ans, Long.toString(N/n).length());
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int ans = 100;
        for(long n=1; n*n<=N; n++) if(N%n==0){
            ans = Math.min(ans, Long.toString(N/n).length());
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int ans = 100;
        for(long n=1; n*n<=N; n++) if(N%n==0){
            ans = Math.min(ans, Long.toString(N/n).length());
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int ans = 100; ans 100 for(long n=1; n*n<=N; n++) if(N%n==0){
            ans = Math.min(ans, Long.toString(N/n).length());
        } long n=1; long n=1; n 1 n*n<=N n*n n n N n++ n++ n if(N%n==0){
            ans = Math.min(ans, Long.toString(N/n).length());
        } if(N%n==0){
            ans = Math.min(ans, Long.toString(N/n).length());
        } N%n==0 N%n N n 0 {
            ans = Math.min(ans, Long.toString(N/n).length());
        } ans = Math.min(ans, Long.toString(N/n).length()) ans Math.min(ans, Long.toString(N/n).length()) Math.min Math ans Long.toString(N/n).length() Long.toString(N/n).length Long.toString(N/n) Long.toString Long N/n N n System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int ans = 100;
        for(long n=1; n*n<=N; n++) if(N%n==0){
            ans = Math.min(ans, Long.toString(N/n).length());
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int ans = 100;
        for(long n=1; n*n<=N; n++) if(N%n==0){
            ans = Math.min(ans, Long.toString(N/n).length());
        }
        System.out.println(ans);
    }
} Main
import java.util.*;
import java.lang.*;

class Pair<E extends Comparable<E>,F extends Comparable<F>> implements Comparable<Pair<E,F>>{
    E first;
    F second;
    public Pair(E first, F second){
        this.first=first;
        this.second=second;
    }
    public E getFirst(){return first;}
    public F getSecond(){return second;}
    public String toString(){
        return "<"+first.toString()+","+second.toString()+">";
    }
    public int hashCode(){
        return first.hashCode()*30011+second.hashCode()+2;
    }
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Pair another = (Pair) obj;
        return this.getFirst().equals(another.getFirst())&&this.getSecond().equals(another.getSecond());
    }

    public int compareTo(Pair<E,F> another){
        if(this.getFirst().equals(another.getFirst())){
            return this.getSecond().compareTo(another.getSecond());
        }
        return this.getFirst().compareTo(another.getFirst());
    }

}
class ArrayLib{
    static<E extends Comparable<E>> E getOrDefault(E[] array, int index, E defaultValue){
        if(index<0 || index>=array.length) return defaultValue;
        return array[index];
    }

    static<E extends Comparable<E>> int maxIndexOfArray(E[] a){
        int ans = 0;
        for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])>0) ans=i;
        }
        return ans;
    }
    static<E extends Comparable<E>> int minIndexOfArray(E[] a){
        int ans = 0;
        for(int i=1;i<a.length;i++){
            if(a[i].compareTo(a[ans])<0) ans=i;
        }
        return ans;
    }

    // minimum x st. array[x] >= elm
    static<E extends Comparable<E>> int lowerBound(E[] array, E elm){
        if(array[0].compareTo(elm)>=0) return 0;
        int min = 0, max = array.length;
        // array[min] < elm
        // array[max] >= elm
        while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) < 0) min = mid;
            else max = mid;
        }
        return max;
    }
    // minimum x st. array[x] > elm
    static<E extends Comparable<E>> int upperBound(E[] array, E elm){
        if(array[0].compareTo(elm)>0) return 0;
        int min = 0, max = array.length;
        // array[min] <= elm
        // array[max] > elm
        while(min+1<max){
            int mid = (min+max)/2;
            if(array[mid].compareTo(elm) <= 0) min = mid;
            else max = mid;
        }
        return max;
    }

    static boolean nextPermutation(List<Integer> list){
        int pivotPos = -1;
        int pivot = 0;
        for (int i=list.size()-2; i>=0; i--) {
            if (list.get(i) < list.get(i+1)) {
                pivotPos = i;
                pivot = list.get(i);
                break;
            }
        }

        if (pivotPos==-1 && pivot==0) return false;

        int L = pivotPos+1, R = list.size()-1;
        int minPos = -1;
        int min = Integer.MAX_VALUE;
        for (int i=R; i>=L; i--) {
            if (pivot < list.get(i)) {
                if (list.get(i) < min) {
                    min = list.get(i);
                    minPos = i;
                }
            }
        }

        Collections.swap(list, pivotPos, minPos);
        Collections.sort(list.subList(L, R+1));

        StringBuilder sb = new StringBuilder();
        for (int i=0; i<list.size(); i++) sb.append(list.get(i));

        return true;
    }
}

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        int ans = 100;
        for(long n=1; n*n<=N; n++) if(N%n==0){
            ans = Math.min(ans, Long.toString(N/n).length());
        }
        System.out.println(ans);
    }
}
