import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    long N = Long.parseLong(scanner.next());
	    long max = (long)N;
	    int c = Integer.MAX_VALUE;
	    for (long i = 1; i <= max; i++) {
	        if ((N % i) == 0) {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } else {
	            max = N / i + 1;
	        }
	    }

        System.out.print(c);
	}

	public static int getDigit(long n) {
	    int c = 0;
		while (n >= 1)
	    {
			c++;
	        n = n/10;
	    }
		return c;
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    long N = Long.parseLong(scanner.next());
	    long max = (long)N;
	    int c = Integer.MAX_VALUE;
	    for (long i = 1; i <= max; i++) {
	        if ((N % i) == 0) {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } else {
	            max = N / i + 1;
	        }
	    }

        System.out.print(c);
	}

	public static int getDigit(long n) {
	    int c = 0;
		while (n >= 1)
	    {
			c++;
	        n = n/10;
	    }
		return c;
	}
} Main public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    long N = Long.parseLong(scanner.next());
	    long max = (long)N;
	    int c = Integer.MAX_VALUE;
	    for (long i = 1; i <= max; i++) {
	        if ((N % i) == 0) {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } else {
	            max = N / i + 1;
	        }
	    }

        System.out.print(c);
	} main {
	    Scanner scanner = new Scanner(System.in);

	    long N = Long.parseLong(scanner.next());
	    long max = (long)N;
	    int c = Integer.MAX_VALUE;
	    for (long i = 1; i <= max; i++) {
	        if ((N % i) == 0) {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } else {
	            max = N / i + 1;
	        }
	    }

        System.out.print(c);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long N = Long.parseLong(scanner.next()); N Long.parseLong(scanner.next()) Long.parseLong Long scanner.next() scanner.next scanner long max = (long)N; max (long)N int c = Integer.MAX_VALUE; c Integer.MAX_VALUE Integer Integer.MAX_VALUE for (long i = 1; i <= max; i++) {
	        if ((N % i) == 0) {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } else {
	            max = N / i + 1;
	        }
	    } long i = 1; long i = 1; i 1 i <= max i max i++ i++ i {
	        if ((N % i) == 0) {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } else {
	            max = N / i + 1;
	        }
	    } {
	        if ((N % i) == 0) {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } else {
	            max = N / i + 1;
	        }
	    } if ((N % i) == 0) {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } else {
	            max = N / i + 1;
	        } (N % i) == 0 (N % i) N i 0 {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } long a = i; a i long b = (long)N / i; b (long)N / i (long)N i if (a > b) break; a > b a b break; int ad = getDigit(a); ad getDigit(a) getDigit a int bd = getDigit(b); bd getDigit(b) getDigit b int md = Math.max(ad, bd); md Math.max(ad, bd) Math.max Math ad bd max = Math.max(a, b) max Math.max(a, b) Math.max Math a b if (md < c) {
	                c = md;
	            } md < c md c {
	                c = md;
	            } c = md c md {
	            max = N / i + 1;
	        } max = N / i + 1 max N / i + 1 N / i N i 1 System.out.print(c) System.out.print System.out System System.out c String[] args args public static int getDigit(long n) {
	    int c = 0;
		while (n >= 1)
	    {
			c++;
	        n = n/10;
	    }
		return c;
	} getDigit {
	    int c = 0;
		while (n >= 1)
	    {
			c++;
	        n = n/10;
	    }
		return c;
	} int c = 0; c 0 while (n >= 1)
	    {
			c++;
	        n = n/10;
	    } n >= 1 n 1 {
			c++;
	        n = n/10;
	    } c++ c n = n/10 n n/10 n 10 return c; c long n n public class Main {

	public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    long N = Long.parseLong(scanner.next());
	    long max = (long)N;
	    int c = Integer.MAX_VALUE;
	    for (long i = 1; i <= max; i++) {
	        if ((N % i) == 0) {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } else {
	            max = N / i + 1;
	        }
	    }

        System.out.print(c);
	}

	public static int getDigit(long n) {
	    int c = 0;
		while (n >= 1)
	    {
			c++;
	        n = n/10;
	    }
		return c;
	}
} public class Main {

	public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    long N = Long.parseLong(scanner.next());
	    long max = (long)N;
	    int c = Integer.MAX_VALUE;
	    for (long i = 1; i <= max; i++) {
	        if ((N % i) == 0) {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } else {
	            max = N / i + 1;
	        }
	    }

        System.out.print(c);
	}

	public static int getDigit(long n) {
	    int c = 0;
		while (n >= 1)
	    {
			c++;
	        n = n/10;
	    }
		return c;
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    long N = Long.parseLong(scanner.next());
	    long max = (long)N;
	    int c = Integer.MAX_VALUE;
	    for (long i = 1; i <= max; i++) {
	        if ((N % i) == 0) {
	            long a = i;
	            long b = (long)N / i;
	            if (a > b) break;
	            int ad = getDigit(a);
	            int bd = getDigit(b);
	            int md = Math.max(ad, bd);
	            max = Math.max(a, b);
	            if (md < c) {
	                c = md;
	            }
	        } else {
	            max = N / i + 1;
	        }
	    }

        System.out.print(c);
	}

	public static int getDigit(long n) {
	    int c = 0;
		while (n >= 1)
	    {
			c++;
	        n = n/10;
	    }
		return c;
	}
}