import java.util.*;

class Main{
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	long n = sc.nextLong();
	for(int i=(int)Math.sqrt(n); i>=1; i--) {
		if(n%i == 0) {
			System.out.println(String.valueOf(n/i).length());
			break;
		}
	}
}
} import java.util.*; util.* java class Main{
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	long n = sc.nextLong();
	for(int i=(int)Math.sqrt(n); i>=1; i--) {
		if(n%i == 0) {
			System.out.println(String.valueOf(n/i).length());
			break;
		}
	}
}
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	long n = sc.nextLong();
	for(int i=(int)Math.sqrt(n); i>=1; i--) {
		if(n%i == 0) {
			System.out.println(String.valueOf(n/i).length());
			break;
		}
	}
} main {
	Scanner sc = new Scanner(System.in);
	long n = sc.nextLong();
	for(int i=(int)Math.sqrt(n); i>=1; i--) {
		if(n%i == 0) {
			System.out.println(String.valueOf(n/i).length());
			break;
		}
	}
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc for(int i=(int)Math.sqrt(n); i>=1; i--) {
		if(n%i == 0) {
			System.out.println(String.valueOf(n/i).length());
			break;
		}
	} int i=(int)Math.sqrt(n); int i=(int)Math.sqrt(n); i (int)Math.sqrt(n) Math.sqrt Math n i>=1 i 1 i-- i-- i {
		if(n%i == 0) {
			System.out.println(String.valueOf(n/i).length());
			break;
		}
	} {
		if(n%i == 0) {
			System.out.println(String.valueOf(n/i).length());
			break;
		}
	} if(n%i == 0) {
			System.out.println(String.valueOf(n/i).length());
			break;
		} n%i == 0 n%i n i 0 {
			System.out.println(String.valueOf(n/i).length());
			break;
		} System.out.println(String.valueOf(n/i).length()) System.out.println System.out System System.out String.valueOf(n/i).length() String.valueOf(n/i).length String.valueOf(n/i) String.valueOf String n/i n i break; String[] args args
import java.util.*;

class Main{
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	long n = sc.nextLong();
	for(int i=(int)Math.sqrt(n); i>=1; i--) {
		if(n%i == 0) {
			System.out.println(String.valueOf(n/i).length());
			break;
		}
	}
}
}