import java.util.Scanner;

public class Main {
	int digit(long k) {
		int ret = 0;
		while (0 < k) {
			k /= 10;
			ret++;
		}
		return ret;
	}

	void run() {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		long min = 1 << 20;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			}
		}
		System.out.println(min);
	}

	public static void main(String[] args) {
		new Main().run();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	int digit(long k) {
		int ret = 0;
		while (0 < k) {
			k /= 10;
			ret++;
		}
		return ret;
	}

	void run() {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		long min = 1 << 20;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			}
		}
		System.out.println(min);
	}

	public static void main(String[] args) {
		new Main().run();
	}
} Main int digit(long k) {
		int ret = 0;
		while (0 < k) {
			k /= 10;
			ret++;
		}
		return ret;
	} digit {
		int ret = 0;
		while (0 < k) {
			k /= 10;
			ret++;
		}
		return ret;
	} int ret = 0; ret 0 while (0 < k) {
			k /= 10;
			ret++;
		} 0 < k 0 k {
			k /= 10;
			ret++;
		} k /= 10 k 10 ret++ ret return ret; ret long k k void run() {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		long min = 1 << 20;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			}
		}
		System.out.println(min);
	} run {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		long min = 1 << 20;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			}
		}
		System.out.println(min);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long min = 1 << 20; min 1 << 20 1 20 for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			}
		} long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
			if (n % i == 0) {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			}
		} {
			if (n % i == 0) {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			}
		} if (n % i == 0) {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			} n % i == 0 n % i n i 0 {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			} min = Math.min(min, Math.max(digit(i), digit(n / i))) min Math.min(min, Math.max(digit(i), digit(n / i))) Math.min Math min Math.max(digit(i), digit(n / i)) Math.max Math digit(i) digit i digit(n / i) digit n / i n i System.out.println(min) System.out.println System.out System System.out min public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main {
	int digit(long k) {
		int ret = 0;
		while (0 < k) {
			k /= 10;
			ret++;
		}
		return ret;
	}

	void run() {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		long min = 1 << 20;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			}
		}
		System.out.println(min);
	}

	public static void main(String[] args) {
		new Main().run();
	}
} public class Main {
	int digit(long k) {
		int ret = 0;
		while (0 < k) {
			k /= 10;
			ret++;
		}
		return ret;
	}

	void run() {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		long min = 1 << 20;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			}
		}
		System.out.println(min);
	}

	public static void main(String[] args) {
		new Main().run();
	}
} Main
import java.util.Scanner;

public class Main {
	int digit(long k) {
		int ret = 0;
		while (0 < k) {
			k /= 10;
			ret++;
		}
		return ret;
	}

	void run() {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		long min = 1 << 20;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				min = Math.min(min, Math.max(digit(i), digit(n / i)));
			}
		}
		System.out.println(min);
	}

	public static void main(String[] args) {
		new Main().run();
	}
}
