import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 0;
		boolean canDiv = false;

		long search = (long)Math.sqrt(N);

		for (long i = 1; i <= search; i++) {
			if(N%i == 0) {
				canDiv = true;
				ans = countDigits(N/i);
			}
		}

		System.out.println(ans);
	}

	public static int countDigits(long n) {
		int cnt = 0;
		while (n > 0) {
			cnt++;
			n /=10;
		}
		return cnt;
	}
} 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 ans = 0;
		boolean canDiv = false;

		long search = (long)Math.sqrt(N);

		for (long i = 1; i <= search; i++) {
			if(N%i == 0) {
				canDiv = true;
				ans = countDigits(N/i);
			}
		}

		System.out.println(ans);
	}

	public static int countDigits(long n) {
		int cnt = 0;
		while (n > 0) {
			cnt++;
			n /=10;
		}
		return cnt;
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 0;
		boolean canDiv = false;

		long search = (long)Math.sqrt(N);

		for (long i = 1; i <= search; i++) {
			if(N%i == 0) {
				canDiv = true;
				ans = countDigits(N/i);
			}
		}

		System.out.println(ans);
	} main {

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 0;
		boolean canDiv = false;

		long search = (long)Math.sqrt(N);

		for (long i = 1; i <= search; i++) {
			if(N%i == 0) {
				canDiv = true;
				ans = countDigits(N/i);
			}
		}

		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int ans = 0; ans 0 boolean canDiv = false; canDiv false long search = (long)Math.sqrt(N); search (long)Math.sqrt(N) Math.sqrt Math N for (long i = 1; i <= search; i++) {
			if(N%i == 0) {
				canDiv = true;
				ans = countDigits(N/i);
			}
		} long i = 1; long i = 1; i 1 i <= search i search i++ i++ i {
			if(N%i == 0) {
				canDiv = true;
				ans = countDigits(N/i);
			}
		} {
			if(N%i == 0) {
				canDiv = true;
				ans = countDigits(N/i);
			}
		} if(N%i == 0) {
				canDiv = true;
				ans = countDigits(N/i);
			} N%i == 0 N%i N i 0 {
				canDiv = true;
				ans = countDigits(N/i);
			} canDiv = true canDiv true ans = countDigits(N/i) ans countDigits(N/i) countDigits N/i N i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static int countDigits(long n) {
		int cnt = 0;
		while (n > 0) {
			cnt++;
			n /=10;
		}
		return cnt;
	} countDigits {
		int cnt = 0;
		while (n > 0) {
			cnt++;
			n /=10;
		}
		return cnt;
	} int cnt = 0; cnt 0 while (n > 0) {
			cnt++;
			n /=10;
		} n > 0 n 0 {
			cnt++;
			n /=10;
		} cnt++ cnt n /=10 n 10 return cnt; cnt long n n public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 0;
		boolean canDiv = false;

		long search = (long)Math.sqrt(N);

		for (long i = 1; i <= search; i++) {
			if(N%i == 0) {
				canDiv = true;
				ans = countDigits(N/i);
			}
		}

		System.out.println(ans);
	}

	public static int countDigits(long n) {
		int cnt = 0;
		while (n > 0) {
			cnt++;
			n /=10;
		}
		return cnt;
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = 0;
		boolean canDiv = false;

		long search = (long)Math.sqrt(N);

		for (long i = 1; i <= search; i++) {
			if(N%i == 0) {
				canDiv = true;
				ans = countDigits(N/i);
			}
		}

		System.out.println(ans);
	}

	public static int countDigits(long n) {
		int cnt = 0;
		while (n > 0) {
			cnt++;
			n /=10;
		}
		return cnt;
	}
} 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 ans = 0;
		boolean canDiv = false;

		long search = (long)Math.sqrt(N);

		for (long i = 1; i <= search; i++) {
			if(N%i == 0) {
				canDiv = true;
				ans = countDigits(N/i);
			}
		}

		System.out.println(ans);
	}

	public static int countDigits(long n) {
		int cnt = 0;
		while (n > 0) {
			cnt++;
			n /=10;
		}
		return cnt;
	}
}
