import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String B;
		long n = Long.MAX_VALUE;

		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0) {
				B = String.valueOf(N / i);
				n = B.length();
			}
		}
		System.out.println(n);
		sc.close();
	}
} 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();
		String B;
		long n = Long.MAX_VALUE;

		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0) {
				B = String.valueOf(N / i);
				n = B.length();
			}
		}
		System.out.println(n);
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String B;
		long n = Long.MAX_VALUE;

		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0) {
				B = String.valueOf(N / i);
				n = B.length();
			}
		}
		System.out.println(n);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String B;
		long n = Long.MAX_VALUE;

		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0) {
				B = String.valueOf(N / i);
				n = B.length();
			}
		}
		System.out.println(n);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc String B; B long n = Long.MAX_VALUE; n Long.MAX_VALUE Long Long.MAX_VALUE for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0) {
				B = String.valueOf(N / i);
				n = B.length();
			}
		} int i = 1; int i = 1; i 1 i <= Math.sqrt(N) i Math.sqrt(N) Math.sqrt Math N i++ i++ i {
			if(N % i == 0) {
				B = String.valueOf(N / i);
				n = B.length();
			}
		} {
			if(N % i == 0) {
				B = String.valueOf(N / i);
				n = B.length();
			}
		} if(N % i == 0) {
				B = String.valueOf(N / i);
				n = B.length();
			} N % i == 0 N % i N i 0 {
				B = String.valueOf(N / i);
				n = B.length();
			} B = String.valueOf(N / i) B String.valueOf(N / i) String.valueOf String N / i N i n = B.length() n B.length() B.length B System.out.println(n) System.out.println System.out System System.out n sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String B;
		long n = Long.MAX_VALUE;

		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0) {
				B = String.valueOf(N / i);
				n = B.length();
			}
		}
		System.out.println(n);
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String B;
		long n = Long.MAX_VALUE;

		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0) {
				B = String.valueOf(N / i);
				n = B.length();
			}
		}
		System.out.println(n);
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String B;
		long n = Long.MAX_VALUE;

		for(int i = 1; i <= Math.sqrt(N); i++) {
			if(N % i == 0) {
				B = String.valueOf(N / i);
				n = B.length();
			}
		}
		System.out.println(n);
		sc.close();
	}
}
