import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		Scanner scanner = new Scanner(System.in);
		long n = scanner.nextLong();
		int ans = 0;
		long a = 0;
		long i;
		long j = 0;
		for(i = 1; i*i <= n; i++){
			if(n % i == 0){
				a = (int) (n / i);
				j = i;
			}
		}
		int p = String.valueOf(a).length();
		int q = String.valueOf(j).length();
		if(p < q){
			System.out.println(q);
		}else{
			System.out.println(p);
		}
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws IOException {
		Scanner scanner = new Scanner(System.in);
		long n = scanner.nextLong();
		int ans = 0;
		long a = 0;
		long i;
		long j = 0;
		for(i = 1; i*i <= n; i++){
			if(n % i == 0){
				a = (int) (n / i);
				j = i;
			}
		}
		int p = String.valueOf(a).length();
		int q = String.valueOf(j).length();
		if(p < q){
			System.out.println(q);
		}else{
			System.out.println(p);
		}
	}
} Main public static void main(String[] args) throws IOException {
		Scanner scanner = new Scanner(System.in);
		long n = scanner.nextLong();
		int ans = 0;
		long a = 0;
		long i;
		long j = 0;
		for(i = 1; i*i <= n; i++){
			if(n % i == 0){
				a = (int) (n / i);
				j = i;
			}
		}
		int p = String.valueOf(a).length();
		int q = String.valueOf(j).length();
		if(p < q){
			System.out.println(q);
		}else{
			System.out.println(p);
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		long n = scanner.nextLong();
		int ans = 0;
		long a = 0;
		long i;
		long j = 0;
		for(i = 1; i*i <= n; i++){
			if(n % i == 0){
				a = (int) (n / i);
				j = i;
			}
		}
		int p = String.valueOf(a).length();
		int q = String.valueOf(j).length();
		if(p < q){
			System.out.println(q);
		}else{
			System.out.println(p);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long n = scanner.nextLong(); n scanner.nextLong() scanner.nextLong scanner int ans = 0; ans 0 long a = 0; a 0 long i; i long j = 0; j 0 for(i = 1; i*i <= n; i++){
			if(n % i == 0){
				a = (int) (n / i);
				j = i;
			}
		} i = 1; i = 1 i 1 i*i <= n i*i i i n i++ i++ i {
			if(n % i == 0){
				a = (int) (n / i);
				j = i;
			}
		} {
			if(n % i == 0){
				a = (int) (n / i);
				j = i;
			}
		} if(n % i == 0){
				a = (int) (n / i);
				j = i;
			} n % i == 0 n % i n i 0 {
				a = (int) (n / i);
				j = i;
			} a = (int) (n / i) a (int) (n / i) n i j = i j i int p = String.valueOf(a).length(); p String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a int q = String.valueOf(j).length(); q String.valueOf(j).length() String.valueOf(j).length String.valueOf(j) String.valueOf String j if(p < q){
			System.out.println(q);
		}else{
			System.out.println(p);
		} p < q p q {
			System.out.println(q);
		} System.out.println(q) System.out.println System.out System System.out q {
			System.out.println(p);
		} System.out.println(p) System.out.println System.out System System.out p String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		Scanner scanner = new Scanner(System.in);
		long n = scanner.nextLong();
		int ans = 0;
		long a = 0;
		long i;
		long j = 0;
		for(i = 1; i*i <= n; i++){
			if(n % i == 0){
				a = (int) (n / i);
				j = i;
			}
		}
		int p = String.valueOf(a).length();
		int q = String.valueOf(j).length();
		if(p < q){
			System.out.println(q);
		}else{
			System.out.println(p);
		}
	}
} public class Main {

	public static void main(String[] args) throws IOException {
		Scanner scanner = new Scanner(System.in);
		long n = scanner.nextLong();
		int ans = 0;
		long a = 0;
		long i;
		long j = 0;
		for(i = 1; i*i <= n; i++){
			if(n % i == 0){
				a = (int) (n / i);
				j = i;
			}
		}
		int p = String.valueOf(a).length();
		int q = String.valueOf(j).length();
		if(p < q){
			System.out.println(q);
		}else{
			System.out.println(p);
		}
	}
} Main
import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		Scanner scanner = new Scanner(System.in);
		long n = scanner.nextLong();
		int ans = 0;
		long a = 0;
		long i;
		long j = 0;
		for(i = 1; i*i <= n; i++){
			if(n % i == 0){
				a = (int) (n / i);
				j = i;
			}
		}
		int p = String.valueOf(a).length();
		int q = String.valueOf(j).length();
		if(p < q){
			System.out.println(q);
		}else{
			System.out.println(p);
		}
	}
}