import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		for (int i = (int)Math.ceil(Math.sqrt(n)); i > 0; i--) {
			if(n%i==0) {
				System.out.println(dig(n/i));
				break;
			}
		}
		sc.close();
	}
	public static long dig(long l) {
		long dig = 0;
		while(l > 0) {
			l = l/10;
			dig++;;
		}
		return dig;
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		for (int i = (int)Math.ceil(Math.sqrt(n)); i > 0; i--) {
			if(n%i==0) {
				System.out.println(dig(n/i));
				break;
			}
		}
		sc.close();
	}
	public static long dig(long l) {
		long dig = 0;
		while(l > 0) {
			l = l/10;
			dig++;;
		}
		return dig;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		for (int i = (int)Math.ceil(Math.sqrt(n)); i > 0; i--) {
			if(n%i==0) {
				System.out.println(dig(n/i));
				break;
			}
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		for (int i = (int)Math.ceil(Math.sqrt(n)); i > 0; i--) {
			if(n%i==0) {
				System.out.println(dig(n/i));
				break;
			}
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc for (int i = (int)Math.ceil(Math.sqrt(n)); i > 0; i--) {
			if(n%i==0) {
				System.out.println(dig(n/i));
				break;
			}
		} int i = (int)Math.ceil(Math.sqrt(n)); int i = (int)Math.ceil(Math.sqrt(n)); i (int)Math.ceil(Math.sqrt(n)) Math.ceil Math Math.sqrt(n) Math.sqrt Math n i > 0 i 0 i-- i-- i {
			if(n%i==0) {
				System.out.println(dig(n/i));
				break;
			}
		} {
			if(n%i==0) {
				System.out.println(dig(n/i));
				break;
			}
		} if(n%i==0) {
				System.out.println(dig(n/i));
				break;
			} n%i==0 n%i n i 0 {
				System.out.println(dig(n/i));
				break;
			} System.out.println(dig(n/i)) System.out.println System.out System System.out dig(n/i) dig n/i n i break; sc.close() sc.close sc String[] args args public static long dig(long l) {
		long dig = 0;
		while(l > 0) {
			l = l/10;
			dig++;;
		}
		return dig;
	} dig {
		long dig = 0;
		while(l > 0) {
			l = l/10;
			dig++;;
		}
		return dig;
	} long dig = 0; dig 0 while(l > 0) {
			l = l/10;
			dig++;;
		} l > 0 l 0 {
			l = l/10;
			dig++;;
		} l = l/10 l l/10 l 10 dig++ dig return dig; dig long l l public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		for (int i = (int)Math.ceil(Math.sqrt(n)); i > 0; i--) {
			if(n%i==0) {
				System.out.println(dig(n/i));
				break;
			}
		}
		sc.close();
	}
	public static long dig(long l) {
		long dig = 0;
		while(l > 0) {
			l = l/10;
			dig++;;
		}
		return dig;
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		for (int i = (int)Math.ceil(Math.sqrt(n)); i > 0; i--) {
			if(n%i==0) {
				System.out.println(dig(n/i));
				break;
			}
		}
		sc.close();
	}
	public static long dig(long l) {
		long dig = 0;
		while(l > 0) {
			l = l/10;
			dig++;;
		}
		return dig;
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		for (int i = (int)Math.ceil(Math.sqrt(n)); i > 0; i--) {
			if(n%i==0) {
				System.out.println(dig(n/i));
				break;
			}
		}
		sc.close();
	}
	public static long dig(long l) {
		long dig = 0;
		while(l > 0) {
			l = l/10;
			dig++;;
		}
		return dig;
	}
}