import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a=0;
		boolean warikire = false;

		for(int i=2; i<=Math.sqrt(n); i++){
			if( n%i == 0 ){
				a = i;
				warikire = true;
			}
		}

		if(warikire){
			System.out.println( keta(n/a) );
		}else{
			System.out.println( keta(n) );
		}
		return;
	}

	public static int keta( long a ){
		int ans = 1;
		while( a/10 != 0 ){
			a /= 10;
			ans++;
		}
		return ans;
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a=0;
		boolean warikire = false;

		for(int i=2; i<=Math.sqrt(n); i++){
			if( n%i == 0 ){
				a = i;
				warikire = true;
			}
		}

		if(warikire){
			System.out.println( keta(n/a) );
		}else{
			System.out.println( keta(n) );
		}
		return;
	}

	public static int keta( long a ){
		int ans = 1;
		while( a/10 != 0 ){
			a /= 10;
			ans++;
		}
		return ans;
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a=0;
		boolean warikire = false;

		for(int i=2; i<=Math.sqrt(n); i++){
			if( n%i == 0 ){
				a = i;
				warikire = true;
			}
		}

		if(warikire){
			System.out.println( keta(n/a) );
		}else{
			System.out.println( keta(n) );
		}
		return;
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a=0;
		boolean warikire = false;

		for(int i=2; i<=Math.sqrt(n); i++){
			if( n%i == 0 ){
				a = i;
				warikire = true;
			}
		}

		if(warikire){
			System.out.println( keta(n/a) );
		}else{
			System.out.println( keta(n) );
		}
		return;
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long a=0; a 0 boolean warikire = false; warikire false for(int i=2; i<=Math.sqrt(n); i++){
			if( n%i == 0 ){
				a = i;
				warikire = true;
			}
		} int i=2; int i=2; i 2 i<=Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
			if( n%i == 0 ){
				a = i;
				warikire = true;
			}
		} {
			if( n%i == 0 ){
				a = i;
				warikire = true;
			}
		} if( n%i == 0 ){
				a = i;
				warikire = true;
			} n%i == 0 n%i n i 0 {
				a = i;
				warikire = true;
			} a = i a i warikire = true warikire true if(warikire){
			System.out.println( keta(n/a) );
		}else{
			System.out.println( keta(n) );
		} warikire {
			System.out.println( keta(n/a) );
		} System.out.println( keta(n/a) ) System.out.println System.out System System.out keta(n/a) keta n/a n a {
			System.out.println( keta(n) );
		} System.out.println( keta(n) ) System.out.println System.out System System.out keta(n) keta n return; String[] args args public static int keta( long a ){
		int ans = 1;
		while( a/10 != 0 ){
			a /= 10;
			ans++;
		}
		return ans;
	} keta {
		int ans = 1;
		while( a/10 != 0 ){
			a /= 10;
			ans++;
		}
		return ans;
	} int ans = 1; ans 1 while( a/10 != 0 ){
			a /= 10;
			ans++;
		} a/10 != 0 a/10 a 10 0 {
			a /= 10;
			ans++;
		} a /= 10 a 10 ans++ ans return ans; ans long a a public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a=0;
		boolean warikire = false;

		for(int i=2; i<=Math.sqrt(n); i++){
			if( n%i == 0 ){
				a = i;
				warikire = true;
			}
		}

		if(warikire){
			System.out.println( keta(n/a) );
		}else{
			System.out.println( keta(n) );
		}
		return;
	}

	public static int keta( long a ){
		int ans = 1;
		while( a/10 != 0 ){
			a /= 10;
			ans++;
		}
		return ans;
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a=0;
		boolean warikire = false;

		for(int i=2; i<=Math.sqrt(n); i++){
			if( n%i == 0 ){
				a = i;
				warikire = true;
			}
		}

		if(warikire){
			System.out.println( keta(n/a) );
		}else{
			System.out.println( keta(n) );
		}
		return;
	}

	public static int keta( long a ){
		int ans = 1;
		while( a/10 != 0 ){
			a /= 10;
			ans++;
		}
		return ans;
	}
} Main
import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a=0;
		boolean warikire = false;

		for(int i=2; i<=Math.sqrt(n); i++){
			if( n%i == 0 ){
				a = i;
				warikire = true;
			}
		}

		if(warikire){
			System.out.println( keta(n/a) );
		}else{
			System.out.println( keta(n) );
		}
		return;
	}

	public static int keta( long a ){
		int ans = 1;
		while( a/10 != 0 ){
			a /= 10;
			ans++;
		}
		return ans;
	}
}