import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		List<Long> yakusu = new ArrayList<>();
		List<Long> kotae  = new ArrayList<>();
		int count=0;
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			}
		}
long max= Long.MAX_VALUE;
		for(int i=0;i<count;i++) {
			long keta1=Long.toString(yakusu.get(i)).length();
			long keta2=Long.toString(kotae.get(i)).length();
			if(Math.max(keta1,keta2)<max) max=Math.max(keta1, keta2);
		}

		System.out.println(max);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util 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();
		List<Long> yakusu = new ArrayList<>();
		List<Long> kotae  = new ArrayList<>();
		int count=0;
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			}
		}
long max= Long.MAX_VALUE;
		for(int i=0;i<count;i++) {
			long keta1=Long.toString(yakusu.get(i)).length();
			long keta2=Long.toString(kotae.get(i)).length();
			if(Math.max(keta1,keta2)<max) max=Math.max(keta1, keta2);
		}

		System.out.println(max);
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		List<Long> yakusu = new ArrayList<>();
		List<Long> kotae  = new ArrayList<>();
		int count=0;
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			}
		}
long max= Long.MAX_VALUE;
		for(int i=0;i<count;i++) {
			long keta1=Long.toString(yakusu.get(i)).length();
			long keta2=Long.toString(kotae.get(i)).length();
			if(Math.max(keta1,keta2)<max) max=Math.max(keta1, keta2);
		}

		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		List<Long> yakusu = new ArrayList<>();
		List<Long> kotae  = new ArrayList<>();
		int count=0;
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			}
		}
long max= Long.MAX_VALUE;
		for(int i=0;i<count;i++) {
			long keta1=Long.toString(yakusu.get(i)).length();
			long keta2=Long.toString(kotae.get(i)).length();
			if(Math.max(keta1,keta2)<max) max=Math.max(keta1, keta2);
		}

		System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n=sc.nextLong(); n sc.nextLong() sc.nextLong sc List<Long> yakusu = new ArrayList<>(); yakusu new ArrayList<>() List<Long> kotae  = new ArrayList<>(); kotae new ArrayList<>() int count=0; count 0 for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			}
		} long i=1; long i=1; i 1 i<=Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
			if(n%i==0) {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			}
		} {
			if(n%i==0) {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			}
		} if(n%i==0) {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			} n%i==0 n%i n i 0 {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			} yakusu.add(i) yakusu.add yakusu i kotae.add(n/i) kotae.add kotae n/i n i count++ count long max= Long.MAX_VALUE; max Long.MAX_VALUE Long Long.MAX_VALUE for(int i=0;i<count;i++) {
			long keta1=Long.toString(yakusu.get(i)).length();
			long keta2=Long.toString(kotae.get(i)).length();
			if(Math.max(keta1,keta2)<max) max=Math.max(keta1, keta2);
		} int i=0; int i=0; i 0 i<count i count i++ i++ i {
			long keta1=Long.toString(yakusu.get(i)).length();
			long keta2=Long.toString(kotae.get(i)).length();
			if(Math.max(keta1,keta2)<max) max=Math.max(keta1, keta2);
		} {
			long keta1=Long.toString(yakusu.get(i)).length();
			long keta2=Long.toString(kotae.get(i)).length();
			if(Math.max(keta1,keta2)<max) max=Math.max(keta1, keta2);
		} long keta1=Long.toString(yakusu.get(i)).length(); keta1 Long.toString(yakusu.get(i)).length() Long.toString(yakusu.get(i)).length Long.toString(yakusu.get(i)) Long.toString Long yakusu.get(i) yakusu.get yakusu i long keta2=Long.toString(kotae.get(i)).length(); keta2 Long.toString(kotae.get(i)).length() Long.toString(kotae.get(i)).length Long.toString(kotae.get(i)) Long.toString Long kotae.get(i) kotae.get kotae i if(Math.max(keta1,keta2)<max) max=Math.max(keta1, keta2); Math.max(keta1,keta2)<max Math.max(keta1,keta2) Math.max Math keta1 keta2 max max=Math.max(keta1, keta2) max Math.max(keta1, keta2) Math.max Math keta1 keta2 System.out.println(max) System.out.println System.out System System.out max String args[] args public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		List<Long> yakusu = new ArrayList<>();
		List<Long> kotae  = new ArrayList<>();
		int count=0;
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			}
		}
long max= Long.MAX_VALUE;
		for(int i=0;i<count;i++) {
			long keta1=Long.toString(yakusu.get(i)).length();
			long keta2=Long.toString(kotae.get(i)).length();
			if(Math.max(keta1,keta2)<max) max=Math.max(keta1, keta2);
		}

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

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		List<Long> yakusu = new ArrayList<>();
		List<Long> kotae  = new ArrayList<>();
		int count=0;
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			}
		}
long max= Long.MAX_VALUE;
		for(int i=0;i<count;i++) {
			long keta1=Long.toString(yakusu.get(i)).length();
			long keta2=Long.toString(kotae.get(i)).length();
			if(Math.max(keta1,keta2)<max) max=Math.max(keta1, keta2);
		}

		System.out.println(max);
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		List<Long> yakusu = new ArrayList<>();
		List<Long> kotae  = new ArrayList<>();
		int count=0;
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				yakusu.add(i);
				kotae.add(n/i);
				count++;
			}
		}
long max= Long.MAX_VALUE;
		for(int i=0;i<count;i++) {
			long keta1=Long.toString(yakusu.get(i)).length();
			long keta2=Long.toString(kotae.get(i)).length();
			if(Math.max(keta1,keta2)<max) max=Math.max(keta1, keta2);
		}

		System.out.println(max);
	}
}
