import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();
		int ans = 11;
		int buf = 0;
		int a = 0;
		int b = 0;
		for (long i=1; i<=Math.sqrt(n); i++) {
			if (n % i == 0) {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			}
		}
		System.out.println(ans);
	}
} 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();
		sc.close();
		int ans = 11;
		int buf = 0;
		int a = 0;
		int b = 0;
		for (long i=1; i<=Math.sqrt(n); i++) {
			if (n % i == 0) {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();
		int ans = 11;
		int buf = 0;
		int a = 0;
		int b = 0;
		for (long i=1; i<=Math.sqrt(n); i++) {
			if (n % i == 0) {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();
		int ans = 11;
		int buf = 0;
		int a = 0;
		int b = 0;
		for (long i=1; i<=Math.sqrt(n); i++) {
			if (n % i == 0) {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			}
		}
		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 sc.close() sc.close sc int ans = 11; ans 11 int buf = 0; buf 0 int a = 0; a 0 int b = 0; b 0 for (long i=1; i<=Math.sqrt(n); i++) {
			if (n % i == 0) {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			}
		} long i=1; long i=1; i 1 i<=Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
			if (n % i == 0) {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			}
		} {
			if (n % i == 0) {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			}
		} if (n % i == 0) {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			} n % i == 0 n % i n i 0 {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			} a = String.valueOf(i).length() a String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i b = String.valueOf(n/i).length() b String.valueOf(n/i).length() String.valueOf(n/i).length String.valueOf(n/i) String.valueOf String n/i n i if (a>b) break; a>b a b break; if (ans > b) ans = b; ans > b ans b ans = b ans b if (a==b) break; a==b a b break; 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)
	{
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();
		int ans = 11;
		int buf = 0;
		int a = 0;
		int b = 0;
		for (long i=1; i<=Math.sqrt(n); i++) {
			if (n % i == 0) {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			}
		}
		System.out.println(ans);
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();
		int ans = 11;
		int buf = 0;
		int a = 0;
		int b = 0;
		for (long i=1; i<=Math.sqrt(n); i++) {
			if (n % i == 0) {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();
		int ans = 11;
		int buf = 0;
		int a = 0;
		int b = 0;
		for (long i=1; i<=Math.sqrt(n); i++) {
			if (n % i == 0) {
				a = String.valueOf(i).length();
				b = String.valueOf(n/i).length();
				if (a>b) break;
				if (ans > b) ans = b;
				if (a==b) break;
			}
		}
		System.out.println(ans);
	}
}
