import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long i = (long) Math.ceil(Math.sqrt(n));
        long j = (long) Math.floor(Math.sqrt(n));
        boolean b = true;
        int answer=0;
        while (b){
            if (n%i==0){
                answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length());
                b = false;
            }
            i++;
            if (n%j==0){
                answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length());
                b = false;
            }
            j--;
        }
        System.out.println(answer);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long i = (long) Math.ceil(Math.sqrt(n));
        long j = (long) Math.floor(Math.sqrt(n));
        boolean b = true;
        int answer=0;
        while (b){
            if (n%i==0){
                answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length());
                b = false;
            }
            i++;
            if (n%j==0){
                answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length());
                b = false;
            }
            j--;
        }
        System.out.println(answer);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long i = (long) Math.ceil(Math.sqrt(n));
        long j = (long) Math.floor(Math.sqrt(n));
        boolean b = true;
        int answer=0;
        while (b){
            if (n%i==0){
                answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length());
                b = false;
            }
            i++;
            if (n%j==0){
                answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length());
                b = false;
            }
            j--;
        }
        System.out.println(answer);
    } main {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long i = (long) Math.ceil(Math.sqrt(n));
        long j = (long) Math.floor(Math.sqrt(n));
        boolean b = true;
        int answer=0;
        while (b){
            if (n%i==0){
                answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length());
                b = false;
            }
            i++;
            if (n%j==0){
                answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length());
                b = false;
            }
            j--;
        }
        System.out.println(answer);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long n = scanner.nextLong(); n scanner.nextLong() scanner.nextLong scanner long i = (long) Math.ceil(Math.sqrt(n)); i (long) Math.ceil(Math.sqrt(n)) Math.ceil Math Math.sqrt(n) Math.sqrt Math n long j = (long) Math.floor(Math.sqrt(n)); j (long) Math.floor(Math.sqrt(n)) Math.floor Math Math.sqrt(n) Math.sqrt Math n boolean b = true; b true int answer=0; answer 0 while (b){
            if (n%i==0){
                answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length());
                b = false;
            }
            i++;
            if (n%j==0){
                answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length());
                b = false;
            }
            j--;
        } b {
            if (n%i==0){
                answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length());
                b = false;
            }
            i++;
            if (n%j==0){
                answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length());
                b = false;
            }
            j--;
        } if (n%i==0){
                answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length());
                b = false;
            } n%i==0 n%i n i 0 {
                answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length());
                b = false;
            } answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length()) answer Math.max(Long.toString(i).length(),Long.toString(n/i).length()) Math.max Math Long.toString(i).length() Long.toString(i).length Long.toString(i) Long.toString Long i Long.toString(n/i).length() Long.toString(n/i).length Long.toString(n/i) Long.toString Long n/i n i b = false b false i++ i if (n%j==0){
                answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length());
                b = false;
            } n%j==0 n%j n j 0 {
                answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length());
                b = false;
            } answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length()) answer Math.max(Long.toString(j).length(),Long.toString(n/j).length()) Math.max Math Long.toString(j).length() Long.toString(j).length Long.toString(j) Long.toString Long j Long.toString(n/j).length() Long.toString(n/j).length Long.toString(n/j) Long.toString Long n/j n j b = false b false j-- j System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long i = (long) Math.ceil(Math.sqrt(n));
        long j = (long) Math.floor(Math.sqrt(n));
        boolean b = true;
        int answer=0;
        while (b){
            if (n%i==0){
                answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length());
                b = false;
            }
            i++;
            if (n%j==0){
                answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length());
                b = false;
            }
            j--;
        }
        System.out.println(answer);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long i = (long) Math.ceil(Math.sqrt(n));
        long j = (long) Math.floor(Math.sqrt(n));
        boolean b = true;
        int answer=0;
        while (b){
            if (n%i==0){
                answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length());
                b = false;
            }
            i++;
            if (n%j==0){
                answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length());
                b = false;
            }
            j--;
        }
        System.out.println(answer);
    }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long i = (long) Math.ceil(Math.sqrt(n));
        long j = (long) Math.floor(Math.sqrt(n));
        boolean b = true;
        int answer=0;
        while (b){
            if (n%i==0){
                answer = Math.max(Long.toString(i).length(),Long.toString(n/i).length());
                b = false;
            }
            i++;
            if (n%j==0){
                answer = Math.max(Long.toString(j).length(),Long.toString(n/j).length());
                b = false;
            }
            j--;
        }
        System.out.println(answer);
    }
}