import java.util.Scanner;
//
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
		long n=sc.nextLong();
		int rootN = (int) (Math.sqrt(n));
		long ans=digCount(n);
		for (int i=1;i<=rootN;i++) {
			if (n%i==0) {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			}
		}
		System.out.println(ans);
		
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
	}
	//----------------------------------------
	//置き場
//桁数
static long digCount(long n) {
	int res = 0;
	while(n > 0) {
		res ++;
		n /= 10;
		}
	return res;
}
	//----------------------------------------
} 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();
		int rootN = (int) (Math.sqrt(n));
		long ans=digCount(n);
		for (int i=1;i<=rootN;i++) {
			if (n%i==0) {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			}
		}
		System.out.println(ans);
		
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
	}
	//----------------------------------------
	//置き場
//桁数
static long digCount(long n) {
	int res = 0;
	while(n > 0) {
		res ++;
		n /= 10;
		}
	return res;
}
	//----------------------------------------
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
		long n=sc.nextLong();
		int rootN = (int) (Math.sqrt(n));
		long ans=digCount(n);
		for (int i=1;i<=rootN;i++) {
			if (n%i==0) {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			}
		}
		System.out.println(ans);
		
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
	} main {
		Scanner sc = new Scanner(System.in);
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
		long n=sc.nextLong();
		int rootN = (int) (Math.sqrt(n));
		long ans=digCount(n);
		for (int i=1;i<=rootN;i++) {
			if (n%i==0) {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			}
		}
		System.out.println(ans);
		
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n=sc.nextLong(); n sc.nextLong() sc.nextLong sc int rootN = (int) (Math.sqrt(n)); rootN (int) (Math.sqrt(n)) Math.sqrt Math n long ans=digCount(n); ans digCount(n) digCount n for (int i=1;i<=rootN;i++) {
			if (n%i==0) {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			}
		} int i=1; int i=1; i 1 i<=rootN i rootN i++ i++ i {
			if (n%i==0) {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			}
		} {
			if (n%i==0) {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			}
		} if (n%i==0) {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			} n%i==0 n%i n i 0 {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			} long a=i; a i long b=n/i; b n/i n i long bigger =Math.max(a,b); bigger Math.max(a,b) Math.max Math a b long biggerDigCount= digCount(bigger); biggerDigCount digCount(bigger) digCount bigger ans =Math.min(ans, biggerDigCount) ans Math.min(ans, biggerDigCount) Math.min Math ans biggerDigCount System.out.println(ans) System.out.println System.out System System.out ans String[] args args //----------------------------------------
	//置き場
//桁数
static long digCount(long n) {
	int res = 0;
	while(n > 0) {
		res ++;
		n /= 10;
		}
	return res;
} digCount {
	int res = 0;
	while(n > 0) {
		res ++;
		n /= 10;
		}
	return res;
} int res = 0; res 0 while(n > 0) {
		res ++;
		n /= 10;
		} n > 0 n 0 {
		res ++;
		n /= 10;
		} res ++ res n /= 10 n 10 return res; res long n n public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
		long n=sc.nextLong();
		int rootN = (int) (Math.sqrt(n));
		long ans=digCount(n);
		for (int i=1;i<=rootN;i++) {
			if (n%i==0) {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			}
		}
		System.out.println(ans);
		
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
	}
	//----------------------------------------
	//置き場
//桁数
static long digCount(long n) {
	int res = 0;
	while(n > 0) {
		res ++;
		n /= 10;
		}
	return res;
}
	//----------------------------------------
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
		long n=sc.nextLong();
		int rootN = (int) (Math.sqrt(n));
		long ans=digCount(n);
		for (int i=1;i<=rootN;i++) {
			if (n%i==0) {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			}
		}
		System.out.println(ans);
		
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
	}
	//----------------------------------------
	//置き場
//桁数
static long digCount(long n) {
	int res = 0;
	while(n > 0) {
		res ++;
		n /= 10;
		}
	return res;
}
	//----------------------------------------
} Main
import java.util.Scanner;
//
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
		long n=sc.nextLong();
		int rootN = (int) (Math.sqrt(n));
		long ans=digCount(n);
		for (int i=1;i<=rootN;i++) {
			if (n%i==0) {
				long a=i;
				long b=n/i;
				long bigger =Math.max(a,b);
				long biggerDigCount= digCount(bigger);
				ans =Math.min(ans, biggerDigCount);
			}
		}
		System.out.println(ans);
		
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
	}
	//----------------------------------------
	//置き場
//桁数
static long digCount(long n) {
	int res = 0;
	while(n > 0) {
		res ++;
		n /= 10;
		}
	return res;
}
	//----------------------------------------
}