import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = Long.MAX_VALUE;
        for(int i = 1; i<=100000; i++) {
            if(n%i==0) min = Math.min((long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1),min);
        }
        System.out.println(min);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = Long.MAX_VALUE;
        for(int i = 1; i<=100000; i++) {
            if(n%i==0) min = Math.min((long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1),min);
        }
        System.out.println(min);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = Long.MAX_VALUE;
        for(int i = 1; i<=100000; i++) {
            if(n%i==0) min = Math.min((long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1),min);
        }
        System.out.println(min);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = Long.MAX_VALUE;
        for(int i = 1; i<=100000; i++) {
            if(n%i==0) min = Math.min((long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1),min);
        }
        System.out.println(min);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long min = Long.MAX_VALUE; min Long.MAX_VALUE Long Long.MAX_VALUE for(int i = 1; i<=100000; i++) {
            if(n%i==0) min = Math.min((long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1),min);
        } int i = 1; int i = 1; i 1 i<=100000 i 100000 i++ i++ i {
            if(n%i==0) min = Math.min((long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1),min);
        } {
            if(n%i==0) min = Math.min((long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1),min);
        } if(n%i==0) min = Math.min((long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1),min); n%i==0 n%i n i 0 min = Math.min((long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1),min) min Math.min((long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1),min) Math.min Math (long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1) Math.max Math Math.log10(n/i)+1 Math.log10(n/i) Math.log10 Math n/i n i 1 Math.log10(i)+1 Math.log10(i) Math.log10 Math i 1 min System.out.println(min) System.out.println System.out System System.out min String[] args args
import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long min = Long.MAX_VALUE;
        for(int i = 1; i<=100000; i++) {
            if(n%i==0) min = Math.min((long)Math.max(Math.log10(n/i)+1,Math.log10(i)+1),min);
        }
        System.out.println(min);
    }
}