/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		long test = sc.nextLong();
		long result = Long.MAX_VALUE;
		for(int i = 1; i <= Math.sqrt(test); i++) {
			if(test % i == 0) {
				long digit = Math.max(i, test/i);
				result = Math.min(result, digit);
			}
		}
		String str = result+"";
		System.out.println(str.length());
	}
	
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		long test = sc.nextLong();
		long result = Long.MAX_VALUE;
		for(int i = 1; i <= Math.sqrt(test); i++) {
			if(test % i == 0) {
				long digit = Math.max(i, test/i);
				result = Math.min(result, digit);
			}
		}
		String str = result+"";
		System.out.println(str.length());
	}
	
} Main public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		long test = sc.nextLong();
		long result = Long.MAX_VALUE;
		for(int i = 1; i <= Math.sqrt(test); i++) {
			if(test % i == 0) {
				long digit = Math.max(i, test/i);
				result = Math.min(result, digit);
			}
		}
		String str = result+"";
		System.out.println(str.length());
	} main {
		Scanner sc = new Scanner(System.in);
		long test = sc.nextLong();
		long result = Long.MAX_VALUE;
		for(int i = 1; i <= Math.sqrt(test); i++) {
			if(test % i == 0) {
				long digit = Math.max(i, test/i);
				result = Math.min(result, digit);
			}
		}
		String str = result+"";
		System.out.println(str.length());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long test = sc.nextLong(); test sc.nextLong() sc.nextLong sc long result = Long.MAX_VALUE; result Long.MAX_VALUE Long Long.MAX_VALUE for(int i = 1; i <= Math.sqrt(test); i++) {
			if(test % i == 0) {
				long digit = Math.max(i, test/i);
				result = Math.min(result, digit);
			}
		} int i = 1; int i = 1; i 1 i <= Math.sqrt(test) i Math.sqrt(test) Math.sqrt Math test i++ i++ i {
			if(test % i == 0) {
				long digit = Math.max(i, test/i);
				result = Math.min(result, digit);
			}
		} {
			if(test % i == 0) {
				long digit = Math.max(i, test/i);
				result = Math.min(result, digit);
			}
		} if(test % i == 0) {
				long digit = Math.max(i, test/i);
				result = Math.min(result, digit);
			} test % i == 0 test % i test i 0 {
				long digit = Math.max(i, test/i);
				result = Math.min(result, digit);
			} long digit = Math.max(i, test/i); digit Math.max(i, test/i) Math.max Math i test/i test i result = Math.min(result, digit) result Math.min(result, digit) Math.min Math result digit String str = result+""; str result+"" result "" System.out.println(str.length()) System.out.println System.out System System.out str.length() str.length str String[] args args
/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		long test = sc.nextLong();
		long result = Long.MAX_VALUE;
		for(int i = 1; i <= Math.sqrt(test); i++) {
			if(test % i == 0) {
				long digit = Math.max(i, test/i);
				result = Math.min(result, digit);
			}
		}
		String str = result+"";
		System.out.println(str.length());
	}
	
}