
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long ans = 1001001001100L;
		for(long i=1; i*i<=n; i++) {
			if(n%i==0) {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			}
		}
		System.out.println(ans);
		sc.close();
	}

	private long f(long x, long y) {
		return Math.max(k(x), k(y));
	}

	private long k(long x) {
		long ret = 0;
		while(x>0) {
			ret++;
			x/=10;
		}
		return ret;
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long ans = 1001001001100L;
		for(long i=1; i*i<=n; i++) {
			if(n%i==0) {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			}
		}
		System.out.println(ans);
		sc.close();
	}

	private long f(long x, long y) {
		return Math.max(k(x), k(y));
	}

	private long k(long x) {
		long ret = 0;
		while(x>0) {
			ret++;
			x/=10;
		}
		return ret;
	}
} Main public static void main(String[] args) {
		Main main = new Main();
		main.run();
	} main {
		Main main = new Main();
		main.run();
	} Main main = new Main(); main new Main() main.run() main.run main String[] args args public void run() {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long ans = 1001001001100L;
		for(long i=1; i*i<=n; i++) {
			if(n%i==0) {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			}
		}
		System.out.println(ans);
		sc.close();
	} run {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long ans = 1001001001100L;
		for(long i=1; i*i<=n; i++) {
			if(n%i==0) {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			}
		}
		System.out.println(ans);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n=sc.nextLong(); n sc.nextLong() sc.nextLong sc long ans = 1001001001100L; ans 1001001001100L for(long i=1; i*i<=n; i++) {
			if(n%i==0) {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			}
		} long i=1; long i=1; i 1 i*i<=n i*i i i n i++ i++ i {
			if(n%i==0) {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			}
		} {
			if(n%i==0) {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			}
		} if(n%i==0) {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			} n%i==0 n%i n i 0 {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			} long x = n/i; x n/i n i long y = i; y i ans = Math.min(ans, f(x,y)) ans Math.min(ans, f(x,y)) Math.min Math ans f(x,y) f x y System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc private long f(long x, long y) {
		return Math.max(k(x), k(y));
	} f {
		return Math.max(k(x), k(y));
	} return Math.max(k(x), k(y)); Math.max(k(x), k(y)) Math.max Math k(x) k x k(y) k y long x x long y y private long k(long x) {
		long ret = 0;
		while(x>0) {
			ret++;
			x/=10;
		}
		return ret;
	} k {
		long ret = 0;
		while(x>0) {
			ret++;
			x/=10;
		}
		return ret;
	} long ret = 0; ret 0 while(x>0) {
			ret++;
			x/=10;
		} x>0 x 0 {
			ret++;
			x/=10;
		} ret++ ret x/=10 x 10 return ret; ret long x x public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long ans = 1001001001100L;
		for(long i=1; i*i<=n; i++) {
			if(n%i==0) {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			}
		}
		System.out.println(ans);
		sc.close();
	}

	private long f(long x, long y) {
		return Math.max(k(x), k(y));
	}

	private long k(long x) {
		long ret = 0;
		while(x>0) {
			ret++;
			x/=10;
		}
		return ret;
	}
} public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long ans = 1001001001100L;
		for(long i=1; i*i<=n; i++) {
			if(n%i==0) {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			}
		}
		System.out.println(ans);
		sc.close();
	}

	private long f(long x, long y) {
		return Math.max(k(x), k(y));
	}

	private long k(long x) {
		long ret = 0;
		while(x>0) {
			ret++;
			x/=10;
		}
		return ret;
	}
} Main

import java.util.*;

public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long ans = 1001001001100L;
		for(long i=1; i*i<=n; i++) {
			if(n%i==0) {
				long x = n/i;
				long y = i;
				ans = Math.min(ans, f(x,y));
				//System.out.println(x+" "+y+" "+ans);
			}
		}
		System.out.println(ans);
		sc.close();
	}

	private long f(long x, long y) {
		return Math.max(k(x), k(y));
	}

	private long k(long x) {
		long ret = 0;
		while(x>0) {
			ret++;
			x/=10;
		}
		return ret;
	}
}
