import java.util.*;

// ABC 22-C
// http://abc022.contest.atcoder.jp/tasks/abc022_c
 
public class Main {

	public static void main (String[] args) throws java.lang.Exception {
		Scanner in = new Scanner(System.in);
		
		long n = in.nextLong();
		for (int i = (int) Math.sqrt(n); i > 0; i--) {
			if (n % i == 0) {
				System.out.println(Math.max(numDigit(i), numDigit((int) (n / i))));
				break;
			}
		}
	}
	
	public static int numDigit(int n) {
		int answer = 0;
		while (n > 0) {
			answer++;
			n /= 10;
		}
		return answer;
	}
} import java.util.*; util.* java public class Main {

	public static void main (String[] args) throws java.lang.Exception {
		Scanner in = new Scanner(System.in);
		
		long n = in.nextLong();
		for (int i = (int) Math.sqrt(n); i > 0; i--) {
			if (n % i == 0) {
				System.out.println(Math.max(numDigit(i), numDigit((int) (n / i))));
				break;
			}
		}
	}
	
	public static int numDigit(int n) {
		int answer = 0;
		while (n > 0) {
			answer++;
			n /= 10;
		}
		return answer;
	}
} Main public static void main (String[] args) throws java.lang.Exception {
		Scanner in = new Scanner(System.in);
		
		long n = in.nextLong();
		for (int i = (int) Math.sqrt(n); i > 0; i--) {
			if (n % i == 0) {
				System.out.println(Math.max(numDigit(i), numDigit((int) (n / i))));
				break;
			}
		}
	} main {
		Scanner in = new Scanner(System.in);
		
		long n = in.nextLong();
		for (int i = (int) Math.sqrt(n); i > 0; i--) {
			if (n % i == 0) {
				System.out.println(Math.max(numDigit(i), numDigit((int) (n / i))));
				break;
			}
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) long n = in.nextLong(); n in.nextLong() in.nextLong in for (int i = (int) Math.sqrt(n); i > 0; i--) {
			if (n % i == 0) {
				System.out.println(Math.max(numDigit(i), numDigit((int) (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) {
				System.out.println(Math.max(numDigit(i), numDigit((int) (n / i))));
				break;
			}
		} {
			if (n % i == 0) {
				System.out.println(Math.max(numDigit(i), numDigit((int) (n / i))));
				break;
			}
		} if (n % i == 0) {
				System.out.println(Math.max(numDigit(i), numDigit((int) (n / i))));
				break;
			} n % i == 0 n % i n i 0 {
				System.out.println(Math.max(numDigit(i), numDigit((int) (n / i))));
				break;
			} System.out.println(Math.max(numDigit(i), numDigit((int) (n / i)))) System.out.println System.out System System.out Math.max(numDigit(i), numDigit((int) (n / i))) Math.max Math numDigit(i) numDigit i numDigit((int) (n / i)) numDigit (int) (n / i) n i break; String[] args args public static int numDigit(int n) {
		int answer = 0;
		while (n > 0) {
			answer++;
			n /= 10;
		}
		return answer;
	} numDigit {
		int answer = 0;
		while (n > 0) {
			answer++;
			n /= 10;
		}
		return answer;
	} int answer = 0; answer 0 while (n > 0) {
			answer++;
			n /= 10;
		} n > 0 n 0 {
			answer++;
			n /= 10;
		} answer++ answer n /= 10 n 10 return answer; answer int n n public class Main {

	public static void main (String[] args) throws java.lang.Exception {
		Scanner in = new Scanner(System.in);
		
		long n = in.nextLong();
		for (int i = (int) Math.sqrt(n); i > 0; i--) {
			if (n % i == 0) {
				System.out.println(Math.max(numDigit(i), numDigit((int) (n / i))));
				break;
			}
		}
	}
	
	public static int numDigit(int n) {
		int answer = 0;
		while (n > 0) {
			answer++;
			n /= 10;
		}
		return answer;
	}
} public class Main {

	public static void main (String[] args) throws java.lang.Exception {
		Scanner in = new Scanner(System.in);
		
		long n = in.nextLong();
		for (int i = (int) Math.sqrt(n); i > 0; i--) {
			if (n % i == 0) {
				System.out.println(Math.max(numDigit(i), numDigit((int) (n / i))));
				break;
			}
		}
	}
	
	public static int numDigit(int n) {
		int answer = 0;
		while (n > 0) {
			answer++;
			n /= 10;
		}
		return answer;
	}
} Main
import java.util.*;

// ABC 22-C
// http://abc022.contest.atcoder.jp/tasks/abc022_c
 
public class Main {

	public static void main (String[] args) throws java.lang.Exception {
		Scanner in = new Scanner(System.in);
		
		long n = in.nextLong();
		for (int i = (int) Math.sqrt(n); i > 0; i--) {
			if (n % i == 0) {
				System.out.println(Math.max(numDigit(i), numDigit((int) (n / i))));
				break;
			}
		}
	}
	
	public static int numDigit(int n) {
		int answer = 0;
		while (n > 0) {
			answer++;
			n /= 10;
		}
		return answer;
	}
}