
import java.io.*;
import java.util.*;
//import java.util.stream.*;
//import java.math.*;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        Scanner sc = new Scanner(System.in);
        long num = sc.nextLong();
        int max = Integer.MAX_VALUE;
        String s = "", str = "";
        for (long i = 1; i * i <= num; i++) {
            if (num % i == 0) {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            }
        }
        System.out.println(max);
        bw.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        Scanner sc = new Scanner(System.in);
        long num = sc.nextLong();
        int max = Integer.MAX_VALUE;
        String s = "", str = "";
        for (long i = 1; i * i <= num; i++) {
            if (num % i == 0) {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            }
        }
        System.out.println(max);
        bw.flush();
    }
} Main public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        Scanner sc = new Scanner(System.in);
        long num = sc.nextLong();
        int max = Integer.MAX_VALUE;
        String s = "", str = "";
        for (long i = 1; i * i <= num; i++) {
            if (num % i == 0) {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            }
        }
        System.out.println(max);
        bw.flush();
    } main {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        Scanner sc = new Scanner(System.in);
        long num = sc.nextLong();
        int max = Integer.MAX_VALUE;
        String s = "", str = "";
        for (long i = 1; i * i <= num; i++) {
            if (num % i == 0) {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            }
        }
        System.out.println(max);
        bw.flush();
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); bw new BufferedWriter(new OutputStreamWriter(System.out)) Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long num = sc.nextLong(); num sc.nextLong() sc.nextLong sc int max = Integer.MAX_VALUE; max Integer.MAX_VALUE Integer Integer.MAX_VALUE String s = "" s "" str = ""; str "" for (long i = 1; i * i <= num; i++) {
            if (num % i == 0) {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            }
        } long i = 1; long i = 1; i 1 i * i <= num i * i i i num i++ i++ i {
            if (num % i == 0) {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            }
        } {
            if (num % i == 0) {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            }
        } if (num % i == 0) {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            } num % i == 0 num % i num i 0 {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            } s = (num / i) + "" s (num / i) + "" (num / i) num i "" str = i + "" str i + "" i "" int x = Math.max(s.length(), str.length()); x Math.max(s.length(), str.length()) Math.max Math s.length() s.length s str.length() str.length str if (x < max) {
                    max = x;
                } x < max x max {
                    max = x;
                } max = x max x System.out.println(max) System.out.println System.out System System.out max bw.flush() bw.flush bw String[] args args public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        Scanner sc = new Scanner(System.in);
        long num = sc.nextLong();
        int max = Integer.MAX_VALUE;
        String s = "", str = "";
        for (long i = 1; i * i <= num; i++) {
            if (num % i == 0) {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            }
        }
        System.out.println(max);
        bw.flush();
    }
} public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        Scanner sc = new Scanner(System.in);
        long num = sc.nextLong();
        int max = Integer.MAX_VALUE;
        String s = "", str = "";
        for (long i = 1; i * i <= num; i++) {
            if (num % i == 0) {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            }
        }
        System.out.println(max);
        bw.flush();
    }
} Main

import java.io.*;
import java.util.*;
//import java.util.stream.*;
//import java.math.*;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        Scanner sc = new Scanner(System.in);
        long num = sc.nextLong();
        int max = Integer.MAX_VALUE;
        String s = "", str = "";
        for (long i = 1; i * i <= num; i++) {
            if (num % i == 0) {
                s = (num / i) + "";
                str = i + "";
                int x = Math.max(s.length(), str.length());
                if (x < max) {
                    max = x;
                }
            }
        }
        System.out.println(max);
        bw.flush();
    }
}
