import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		long n = Long.parseLong(input.readLine( ));
		long a = 1;
		long b = 1;
		long answer = String.valueOf(n).length();

		while(a < Math.sqrt(n)+1){
			if(n%a == 0){
				b = n / a;
				if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				}
			}
			a++;
		}
		System.out.println(answer);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		long n = Long.parseLong(input.readLine( ));
		long a = 1;
		long b = 1;
		long answer = String.valueOf(n).length();

		while(a < Math.sqrt(n)+1){
			if(n%a == 0){
				b = n / a;
				if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				}
			}
			a++;
		}
		System.out.println(answer);
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		long n = Long.parseLong(input.readLine( ));
		long a = 1;
		long b = 1;
		long answer = String.valueOf(n).length();

		while(a < Math.sqrt(n)+1){
			if(n%a == 0){
				b = n / a;
				if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				}
			}
			a++;
		}
		System.out.println(answer);
	} main {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		long n = Long.parseLong(input.readLine( ));
		long a = 1;
		long b = 1;
		long answer = String.valueOf(n).length();

		while(a < Math.sqrt(n)+1){
			if(n%a == 0){
				b = n / a;
				if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				}
			}
			a++;
		}
		System.out.println(answer);
	} BufferedReader input =new BufferedReader (new InputStreamReader (System.in)); input new BufferedReader (new InputStreamReader (System.in)) long n = Long.parseLong(input.readLine( )); n Long.parseLong(input.readLine( )) Long.parseLong Long input.readLine( ) input.readLine input long a = 1; a 1 long b = 1; b 1 long answer = String.valueOf(n).length(); answer String.valueOf(n).length() String.valueOf(n).length String.valueOf(n) String.valueOf String n while(a < Math.sqrt(n)+1){
			if(n%a == 0){
				b = n / a;
				if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				}
			}
			a++;
		} a < Math.sqrt(n)+1 a Math.sqrt(n)+1 Math.sqrt(n) Math.sqrt Math n 1 {
			if(n%a == 0){
				b = n / a;
				if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				}
			}
			a++;
		} if(n%a == 0){
				b = n / a;
				if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				}
			} n%a == 0 n%a n a 0 {
				b = n / a;
				if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				}
			} b = n / a b n / a n a if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				} answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length() answer > String.valueOf(b).length() answer String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b String.valueOf(b).length() >= String.valueOf(a).length() String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a {
					answer = String.valueOf(b).length();
				} answer = String.valueOf(b).length() answer String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b a++ a 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) throws IOException {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		long n = Long.parseLong(input.readLine( ));
		long a = 1;
		long b = 1;
		long answer = String.valueOf(n).length();

		while(a < Math.sqrt(n)+1){
			if(n%a == 0){
				b = n / a;
				if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				}
			}
			a++;
		}
		System.out.println(answer);
	}
} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		long n = Long.parseLong(input.readLine( ));
		long a = 1;
		long b = 1;
		long answer = String.valueOf(n).length();

		while(a < Math.sqrt(n)+1){
			if(n%a == 0){
				b = n / a;
				if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				}
			}
			a++;
		}
		System.out.println(answer);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		long n = Long.parseLong(input.readLine( ));
		long a = 1;
		long b = 1;
		long answer = String.valueOf(n).length();

		while(a < Math.sqrt(n)+1){
			if(n%a == 0){
				b = n / a;
				if(answer > String.valueOf(b).length() && String.valueOf(b).length() >= String.valueOf(a).length()){
					answer = String.valueOf(b).length();
				}
			}
			a++;
		}
		System.out.println(answer);
	}
}
