import java.util.*;
import java.io.PrintWriter;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static final int AB = 26;
	public static void main(String[] args) {
		long i=0,j=0,k=0;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		sc.close();
		long mn = 10;
		for (i = 1; i*i <= n; i++) {
			if(n%i==0) {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			}
		}
		out.println(mn);
	}
} import java.util.*; util.* java import java.io.PrintWriter; PrintWriter java.io import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
	public static final int AB = 26;
	public static void main(String[] args) {
		long i=0,j=0,k=0;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		sc.close();
		long mn = 10;
		for (i = 1; i*i <= n; i++) {
			if(n%i==0) {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			}
		}
		out.println(mn);
	}
} Main public static final int AB = 26; AB 26 public static void main(String[] args) {
		long i=0,j=0,k=0;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		sc.close();
		long mn = 10;
		for (i = 1; i*i <= n; i++) {
			if(n%i==0) {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			}
		}
		out.println(mn);
	} main {
		long i=0,j=0,k=0;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		sc.close();
		long mn = 10;
		for (i = 1; i*i <= n; i++) {
			if(n%i==0) {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			}
		}
		out.println(mn);
	} long i=0 i 0 j=0 j 0 k=0; k 0 Scanner sc = new Scanner(in); sc new Scanner(in) long n = parseLong(sc.next()); n parseLong(sc.next()) parseLong sc.next() sc.next sc sc.close() sc.close sc long mn = 10; mn 10 for (i = 1; i*i <= n; i++) {
			if(n%i==0) {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			}
		} i = 1; i = 1 i 1 i*i <= n i*i i i n i++ i++ i {
			if(n%i==0) {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			}
		} {
			if(n%i==0) {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			}
		} if(n%i==0) {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			} n%i==0 n%i n i 0 {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			} long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1)); tmp (long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1)) Math.max Math floor(log10(i)+1) floor log10(i)+1 log10(i) log10 i 1 floor(log10(n/i)+1) floor log10(n/i)+1 log10(n/i) log10 n/i n i 1 if(tmp<mn)mn=tmp; tmp<mn tmp mn mn=tmp mn tmp out.println(mn) out.println out mn String[] args args public class Main {
	public static final int AB = 26;
	public static void main(String[] args) {
		long i=0,j=0,k=0;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		sc.close();
		long mn = 10;
		for (i = 1; i*i <= n; i++) {
			if(n%i==0) {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			}
		}
		out.println(mn);
	}
} public class Main {
	public static final int AB = 26;
	public static void main(String[] args) {
		long i=0,j=0,k=0;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		sc.close();
		long mn = 10;
		for (i = 1; i*i <= n; i++) {
			if(n%i==0) {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			}
		}
		out.println(mn);
	}
} Main
import java.util.*;
import java.io.PrintWriter;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static final int AB = 26;
	public static void main(String[] args) {
		long i=0,j=0,k=0;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		sc.close();
		long mn = 10;
		for (i = 1; i*i <= n; i++) {
			if(n%i==0) {
				long tmp=(long) Math.max(floor(log10(i)+1),floor(log10(n/i)+1));
				if(tmp<mn)mn=tmp;
			}
		}
		out.println(mn);
	}
}
