import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();
		Long n = 0L;
		for(int i = (int)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				n = N/ i;
				break;
			}
		}
		System.out.println(n.toString().length());
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();
		Long n = 0L;
		for(int i = (int)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				n = N/ i;
				break;
			}
		}
		System.out.println(n.toString().length());
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();
		Long n = 0L;
		for(int i = (int)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				n = N/ i;
				break;
			}
		}
		System.out.println(n.toString().length());
	} main {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();
		Long n = 0L;
		for(int i = (int)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				n = N/ i;
				break;
			}
		}
		System.out.println(n.toString().length());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Long N = Long.parseLong(sc.next()); N Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc sc.close() sc.close sc Long n = 0L; n 0L for(int i = (int)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				n = N/ i;
				break;
			}
		} int i = (int)Math.sqrt(N); int i = (int)Math.sqrt(N); i (int)Math.sqrt(N) Math.sqrt Math N i > 0 i 0 i-- i-- i {
			if(N%i==0) {
				n = N/ i;
				break;
			}
		} {
			if(N%i==0) {
				n = N/ i;
				break;
			}
		} if(N%i==0) {
				n = N/ i;
				break;
			} N%i==0 N%i N i 0 {
				n = N/ i;
				break;
			} n = N/ i n N/ i N i break; System.out.println(n.toString().length()) System.out.println System.out System System.out n.toString().length() n.toString().length n.toString() n.toString n String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();
		Long n = 0L;
		for(int i = (int)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				n = N/ i;
				break;
			}
		}
		System.out.println(n.toString().length());
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();
		Long n = 0L;
		for(int i = (int)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				n = N/ i;
				break;
			}
		}
		System.out.println(n.toString().length());
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();
		Long n = 0L;
		for(int i = (int)Math.sqrt(N);i > 0;i--) {
			if(N%i==0) {
				n = N/ i;
				break;
			}
		}
		System.out.println(n.toString().length());
	}
}