
import java.util.Scanner;

public class Main {

    private static Scanner scan = new Scanner(System.in);

    public static void main(String[] args) {
	long N = Long.parseLong(scan.next());

	int min = Integer.MAX_VALUE;
	long A = 1;
	long B = N;
	for (; A <= B; A++) {
	    if(N % A == 0) {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } else {
		B = N / A + 1;
	    }
	}

	System.out.println(min);
	scan.close();
    }

    private static int digits(long x) {
	return (int)Math.log10(x)+1;
    }

    private static int F(long a, long b) {
	int c = digits(a);
	int d = digits(b);

	return (c > d) ? c : d;
    }
} import java.util.Scanner; Scanner java.util public class Main {

    private static Scanner scan = new Scanner(System.in);

    public static void main(String[] args) {
	long N = Long.parseLong(scan.next());

	int min = Integer.MAX_VALUE;
	long A = 1;
	long B = N;
	for (; A <= B; A++) {
	    if(N % A == 0) {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } else {
		B = N / A + 1;
	    }
	}

	System.out.println(min);
	scan.close();
    }

    private static int digits(long x) {
	return (int)Math.log10(x)+1;
    }

    private static int F(long a, long b) {
	int c = digits(a);
	int d = digits(b);

	return (c > d) ? c : d;
    }
} Main private static Scanner scan = new Scanner(System.in); scan new Scanner(System.in) public static void main(String[] args) {
	long N = Long.parseLong(scan.next());

	int min = Integer.MAX_VALUE;
	long A = 1;
	long B = N;
	for (; A <= B; A++) {
	    if(N % A == 0) {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } else {
		B = N / A + 1;
	    }
	}

	System.out.println(min);
	scan.close();
    } main {
	long N = Long.parseLong(scan.next());

	int min = Integer.MAX_VALUE;
	long A = 1;
	long B = N;
	for (; A <= B; A++) {
	    if(N % A == 0) {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } else {
		B = N / A + 1;
	    }
	}

	System.out.println(min);
	scan.close();
    } long N = Long.parseLong(scan.next()); N Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE long A = 1; A 1 long B = N; B N for (; A <= B; A++) {
	    if(N % A == 0) {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } else {
		B = N / A + 1;
	    }
	} ; A <= B A B A++ A++ A {
	    if(N % A == 0) {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } else {
		B = N / A + 1;
	    }
	} {
	    if(N % A == 0) {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } else {
		B = N / A + 1;
	    }
	} if(N % A == 0) {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } else {
		B = N / A + 1;
	    } N % A == 0 N % A N A 0 {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } B = N / A B N / A N A int tmp = F(A, B); tmp F(A, B) F A B if(tmp < min) min = tmp; tmp < min tmp min min = tmp min tmp {
		B = N / A + 1;
	    } B = N / A + 1 B N / A + 1 N / A N A 1 System.out.println(min) System.out.println System.out System System.out min scan.close() scan.close scan String[] args args private static int digits(long x) {
	return (int)Math.log10(x)+1;
    } digits {
	return (int)Math.log10(x)+1;
    } return (int)Math.log10(x)+1; (int)Math.log10(x)+1 (int)Math.log10(x) Math.log10 Math x 1 long x x private static int F(long a, long b) {
	int c = digits(a);
	int d = digits(b);

	return (c > d) ? c : d;
    } F {
	int c = digits(a);
	int d = digits(b);

	return (c > d) ? c : d;
    } int c = digits(a); c digits(a) digits a int d = digits(b); d digits(b) digits b return (c > d) ? c : d; (c > d) ? c : d (c > d) c d c d long a a long b b public class Main {

    private static Scanner scan = new Scanner(System.in);

    public static void main(String[] args) {
	long N = Long.parseLong(scan.next());

	int min = Integer.MAX_VALUE;
	long A = 1;
	long B = N;
	for (; A <= B; A++) {
	    if(N % A == 0) {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } else {
		B = N / A + 1;
	    }
	}

	System.out.println(min);
	scan.close();
    }

    private static int digits(long x) {
	return (int)Math.log10(x)+1;
    }

    private static int F(long a, long b) {
	int c = digits(a);
	int d = digits(b);

	return (c > d) ? c : d;
    }
} public class Main {

    private static Scanner scan = new Scanner(System.in);

    public static void main(String[] args) {
	long N = Long.parseLong(scan.next());

	int min = Integer.MAX_VALUE;
	long A = 1;
	long B = N;
	for (; A <= B; A++) {
	    if(N % A == 0) {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } else {
		B = N / A + 1;
	    }
	}

	System.out.println(min);
	scan.close();
    }

    private static int digits(long x) {
	return (int)Math.log10(x)+1;
    }

    private static int F(long a, long b) {
	int c = digits(a);
	int d = digits(b);

	return (c > d) ? c : d;
    }
} Main

import java.util.Scanner;

public class Main {

    private static Scanner scan = new Scanner(System.in);

    public static void main(String[] args) {
	long N = Long.parseLong(scan.next());

	int min = Integer.MAX_VALUE;
	long A = 1;
	long B = N;
	for (; A <= B; A++) {
	    if(N % A == 0) {
		B = N / A;
		int tmp = F(A, B);
		if(tmp < min) min = tmp;
	    } else {
		B = N / A + 1;
	    }
	}

	System.out.println(min);
	scan.close();
    }

    private static int digits(long x) {
	return (int)Math.log10(x)+1;
    }

    private static int F(long a, long b) {
	int c = digits(a);
	int d = digits(b);

	return (c > d) ? c : d;
    }
}
