import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;
 
public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		long n = Long.parseLong(br.readLine());
		int f = Integer.MAX_VALUE;
		for(long i = 100000; i > 0; i--){
			if(n%i==0){
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			}
		}
		System.out.println(f);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.*; util.* java import java.math.*; math.* java public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		long n = Long.parseLong(br.readLine());
		int f = Integer.MAX_VALUE;
		for(long i = 100000; i > 0; i--){
			if(n%i==0){
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			}
		}
		System.out.println(f);
	}
} Main public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		long n = Long.parseLong(br.readLine());
		int f = Integer.MAX_VALUE;
		for(long i = 100000; i > 0; i--){
			if(n%i==0){
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			}
		}
		System.out.println(f);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		long n = Long.parseLong(br.readLine());
		int f = Integer.MAX_VALUE;
		for(long i = 100000; i > 0; i--){
			if(n%i==0){
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			}
		}
		System.out.println(f);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() long n = Long.parseLong(br.readLine()); n Long.parseLong(br.readLine()) Long.parseLong Long br.readLine() br.readLine br int f = Integer.MAX_VALUE; f Integer.MAX_VALUE Integer Integer.MAX_VALUE for(long i = 100000; i > 0; i--){
			if(n%i==0){
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			}
		} long i = 100000; long i = 100000; i 100000 i > 0 i 0 i-- i-- i {
			if(n%i==0){
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			}
		} {
			if(n%i==0){
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			}
		} if(n%i==0){
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			} n%i==0 n%i n i 0 {
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			} long a = n/i; a n/i n i f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length())) f Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length())) Math.min Math f Math.max(String.valueOf(a).length(),String.valueOf(i).length()) Math.max Math String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i System.out.println(f) System.out.println System.out System System.out f String[] args args public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		long n = Long.parseLong(br.readLine());
		int f = Integer.MAX_VALUE;
		for(long i = 100000; i > 0; i--){
			if(n%i==0){
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			}
		}
		System.out.println(f);
	}
} public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		long n = Long.parseLong(br.readLine());
		int f = Integer.MAX_VALUE;
		for(long i = 100000; i > 0; i--){
			if(n%i==0){
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			}
		}
		System.out.println(f);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;
 
public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		long n = Long.parseLong(br.readLine());
		int f = Integer.MAX_VALUE;
		for(long i = 100000; i > 0; i--){
			if(n%i==0){
				long a = n/i;
				f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length()));
			}
		}
		System.out.println(f);
	}
}