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