/**
 * ACB057-C-Digits in Multiplication
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] words;

		long N = parseLong(br.readLine());

		int min = String.valueOf(N).length();

		for (int i = 1; i <= Math.sqrt(N); i++) {
			if (N % i == 0) min = Math.min(min, String.valueOf(N / i).length());
		}

		System.out.println(min);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import static java.lang.Integer.parseInt; import static java.lang.Integer.parseInt; import static java.lang.Integer.parseInt; import static java.lang.Long.parseLong; import static java.lang.Long.parseLong; import static java.lang.Long.parseLong; public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] words;

		long N = parseLong(br.readLine());

		int min = String.valueOf(N).length();

		for (int i = 1; i <= Math.sqrt(N); i++) {
			if (N % i == 0) min = Math.min(min, String.valueOf(N / i).length());
		}

		System.out.println(min);
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] words;

		long N = parseLong(br.readLine());

		int min = String.valueOf(N).length();

		for (int i = 1; i <= Math.sqrt(N); i++) {
			if (N % i == 0) min = Math.min(min, String.valueOf(N / i).length());
		}

		System.out.println(min);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] words;

		long N = parseLong(br.readLine());

		int min = String.valueOf(N).length();

		for (int i = 1; i <= Math.sqrt(N); i++) {
			if (N % i == 0) min = Math.min(min, String.valueOf(N / i).length());
		}

		System.out.println(min);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line; line String[] words; words long N = parseLong(br.readLine()); N parseLong(br.readLine()) parseLong br.readLine() br.readLine br int min = String.valueOf(N).length(); min String.valueOf(N).length() String.valueOf(N).length String.valueOf(N) String.valueOf String N for (int i = 1; i <= Math.sqrt(N); i++) {
			if (N % i == 0) min = Math.min(min, String.valueOf(N / i).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) min = Math.min(min, String.valueOf(N / i).length());
		} {
			if (N % i == 0) min = Math.min(min, String.valueOf(N / i).length());
		} if (N % i == 0) min = Math.min(min, String.valueOf(N / i).length()); N % i == 0 N % i N i 0 min = Math.min(min, String.valueOf(N / i).length()) min Math.min(min, String.valueOf(N / i).length()) Math.min Math min String.valueOf(N / i).length() String.valueOf(N / i).length String.valueOf(N / i) String.valueOf String N / i N i System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] words;

		long N = parseLong(br.readLine());

		int min = String.valueOf(N).length();

		for (int i = 1; i <= Math.sqrt(N); i++) {
			if (N % i == 0) min = Math.min(min, String.valueOf(N / i).length());
		}

		System.out.println(min);
	}
} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] words;

		long N = parseLong(br.readLine());

		int min = String.valueOf(N).length();

		for (int i = 1; i <= Math.sqrt(N); i++) {
			if (N % i == 0) min = Math.min(min, String.valueOf(N / i).length());
		}

		System.out.println(min);
	}
} Main
/**
 * ACB057-C-Digits in Multiplication
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] words;

		long N = parseLong(br.readLine());

		int min = String.valueOf(N).length();

		for (int i = 1; i <= Math.sqrt(N); i++) {
			if (N % i == 0) min = Math.min(min, String.valueOf(N / i).length());
		}

		System.out.println(min);
	}
}