

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();

		long last = 0;

		long i = 1;
		long sqrt_N = (long)Math.sqrt(N);
		while(i <= sqrt_N){
			if(N % i == 0){
				last = N / i;
			}
			i++;
		}

		System.out.println(String.valueOf(last).length());

		sc.close();
	}

} 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();

		long last = 0;

		long i = 1;
		long sqrt_N = (long)Math.sqrt(N);
		while(i <= sqrt_N){
			if(N % i == 0){
				last = N / i;
			}
			i++;
		}

		System.out.println(String.valueOf(last).length());

		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();

		long last = 0;

		long i = 1;
		long sqrt_N = (long)Math.sqrt(N);
		while(i <= sqrt_N){
			if(N % i == 0){
				last = N / i;
			}
			i++;
		}

		System.out.println(String.valueOf(last).length());

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();

		long last = 0;

		long i = 1;
		long sqrt_N = (long)Math.sqrt(N);
		while(i <= sqrt_N){
			if(N % i == 0){
				last = N / i;
			}
			i++;
		}

		System.out.println(String.valueOf(last).length());

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long last = 0; last 0 long i = 1; i 1 long sqrt_N = (long)Math.sqrt(N); sqrt_N (long)Math.sqrt(N) Math.sqrt Math N while(i <= sqrt_N){
			if(N % i == 0){
				last = N / i;
			}
			i++;
		} i <= sqrt_N i sqrt_N {
			if(N % i == 0){
				last = N / i;
			}
			i++;
		} if(N % i == 0){
				last = N / i;
			} N % i == 0 N % i N i 0 {
				last = N / i;
			} last = N / i last N / i N i i++ i System.out.println(String.valueOf(last).length()) System.out.println System.out System System.out String.valueOf(last).length() String.valueOf(last).length String.valueOf(last) String.valueOf String last sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();

		long last = 0;

		long i = 1;
		long sqrt_N = (long)Math.sqrt(N);
		while(i <= sqrt_N){
			if(N % i == 0){
				last = N / i;
			}
			i++;
		}

		System.out.println(String.valueOf(last).length());

		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();

		long last = 0;

		long i = 1;
		long sqrt_N = (long)Math.sqrt(N);
		while(i <= sqrt_N){
			if(N % i == 0){
				last = N / i;
			}
			i++;
		}

		System.out.println(String.valueOf(last).length());

		sc.close();
	}

} Main


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();

		long last = 0;

		long i = 1;
		long sqrt_N = (long)Math.sqrt(N);
		while(i <= sqrt_N){
			if(N % i == 0){
				last = N / i;
			}
			i++;
		}

		System.out.println(String.valueOf(last).length());

		sc.close();
	}

}
