
import java.util.Scanner;

public class Main {

	public static long F(long A, long B) {
		return Math.max(String.valueOf(A).length(), String.valueOf(B).length());
	}

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long B = 0;

		for(long i=(long)Math.sqrt(N); i >=1 ; i--) {
			if(N%i==0) {
				B=N/i;
				System.out.println(F(i, B));
				break;
			}
		}
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static long F(long A, long B) {
		return Math.max(String.valueOf(A).length(), String.valueOf(B).length());
	}

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long B = 0;

		for(long i=(long)Math.sqrt(N); i >=1 ; i--) {
			if(N%i==0) {
				B=N/i;
				System.out.println(F(i, B));
				break;
			}
		}
		scan.close();
	}
} Main public static long F(long A, long B) {
		return Math.max(String.valueOf(A).length(), String.valueOf(B).length());
	} F {
		return Math.max(String.valueOf(A).length(), String.valueOf(B).length());
	} return Math.max(String.valueOf(A).length(), String.valueOf(B).length()); Math.max(String.valueOf(A).length(), String.valueOf(B).length()) Math.max Math String.valueOf(A).length() String.valueOf(A).length String.valueOf(A) String.valueOf String A String.valueOf(B).length() String.valueOf(B).length String.valueOf(B) String.valueOf String B long A A long B B public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long B = 0;

		for(long i=(long)Math.sqrt(N); i >=1 ; i--) {
			if(N%i==0) {
				B=N/i;
				System.out.println(F(i, B));
				break;
			}
		}
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long B = 0;

		for(long i=(long)Math.sqrt(N); i >=1 ; i--) {
			if(N%i==0) {
				B=N/i;
				System.out.println(F(i, B));
				break;
			}
		}
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long N = scan.nextLong(); N scan.nextLong() scan.nextLong scan long B = 0; B 0 for(long i=(long)Math.sqrt(N); i >=1 ; i--) {
			if(N%i==0) {
				B=N/i;
				System.out.println(F(i, B));
				break;
			}
		} long i=(long)Math.sqrt(N); long i=(long)Math.sqrt(N); i (long)Math.sqrt(N) Math.sqrt Math N i >=1 i 1 i-- i-- i {
			if(N%i==0) {
				B=N/i;
				System.out.println(F(i, B));
				break;
			}
		} {
			if(N%i==0) {
				B=N/i;
				System.out.println(F(i, B));
				break;
			}
		} if(N%i==0) {
				B=N/i;
				System.out.println(F(i, B));
				break;
			} N%i==0 N%i N i 0 {
				B=N/i;
				System.out.println(F(i, B));
				break;
			} B=N/i B N/i N i System.out.println(F(i, B)) System.out.println System.out System System.out F(i, B) F i B break; scan.close() scan.close scan String[] args args public class Main {

	public static long F(long A, long B) {
		return Math.max(String.valueOf(A).length(), String.valueOf(B).length());
	}

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long B = 0;

		for(long i=(long)Math.sqrt(N); i >=1 ; i--) {
			if(N%i==0) {
				B=N/i;
				System.out.println(F(i, B));
				break;
			}
		}
		scan.close();
	}
} public class Main {

	public static long F(long A, long B) {
		return Math.max(String.valueOf(A).length(), String.valueOf(B).length());
	}

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long B = 0;

		for(long i=(long)Math.sqrt(N); i >=1 ; i--) {
			if(N%i==0) {
				B=N/i;
				System.out.println(F(i, B));
				break;
			}
		}
		scan.close();
	}
} Main

import java.util.Scanner;

public class Main {

	public static long F(long A, long B) {
		return Math.max(String.valueOf(A).length(), String.valueOf(B).length());
	}

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long B = 0;

		for(long i=(long)Math.sqrt(N); i >=1 ; i--) {
			if(N%i==0) {
				B=N/i;
				System.out.println(F(i, B));
				break;
			}
		}
		scan.close();
	}
}
