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

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = Integer.MAX_VALUE;
        int n2 = (int)Math.pow(n, 0.5)+1;
        for(int i = 1; i < n2; i++){
            if(n % i == 0){
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
            }
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = Integer.MAX_VALUE;
        int n2 = (int)Math.pow(n, 0.5)+1;
        for(int i = 1; i < n2; i++){
            if(n % i == 0){
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = Integer.MAX_VALUE;
        int n2 = (int)Math.pow(n, 0.5)+1;
        for(int i = 1; i < n2; i++){
            if(n % i == 0){
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = Integer.MAX_VALUE;
        int n2 = (int)Math.pow(n, 0.5)+1;
        for(int i = 1; i < n2; i++){
            if(n % i == 0){
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).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 = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE int n2 = (int)Math.pow(n, 0.5)+1; n2 (int)Math.pow(n, 0.5)+1 (int)Math.pow(n, 0.5) Math.pow Math n 0.5 1 for(int i = 1; i < n2; i++){
            if(n % i == 0){
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
            }
        } int i = 1; int i = 1; i 1 i < n2 i n2 i++ i++ i {
            if(n % i == 0){
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
            }
        } {
            if(n % i == 0){
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
            }
        } if(n % i == 0){
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
            } n % i == 0 n % i n i 0 {
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
            } ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length())) ans Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length())) Math.min Math ans Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()) Math.max Math String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i String.valueOf(n/i).length() String.valueOf(n/i).length String.valueOf(n/i) String.valueOf String n/i n i 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) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = Integer.MAX_VALUE;
        int n2 = (int)Math.pow(n, 0.5)+1;
        for(int i = 1; i < n2; i++){
            if(n % i == 0){
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
            }
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = Integer.MAX_VALUE;
        int n2 = (int)Math.pow(n, 0.5)+1;
        for(int i = 1; i < n2; i++){
            if(n % i == 0){
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.*;
import java.io.*;
import java.math.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int ans = Integer.MAX_VALUE;
        int n2 = (int)Math.pow(n, 0.5)+1;
        for(int i = 1; i < n2; i++){
            if(n % i == 0){
                ans = Math.min(ans,Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
            }
        }
        System.out.println(ans);
    }
}