import java.util.Scanner;

/**
 * Created by zzt on 17-3-26.
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();

        int ret = String.valueOf(n).length();

        for (long i = 1; i <= n/i ; i++) {
            if (n%i==0) {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            }
        }
        System.out.println(ret);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();

        int ret = String.valueOf(n).length();

        for (long i = 1; i <= n/i ; i++) {
            if (n%i==0) {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            }
        }
        System.out.println(ret);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();

        int ret = String.valueOf(n).length();

        for (long i = 1; i <= n/i ; i++) {
            if (n%i==0) {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            }
        }
        System.out.println(ret);
    } main {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();

        int ret = String.valueOf(n).length();

        for (long i = 1; i <= n/i ; i++) {
            if (n%i==0) {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            }
        }
        System.out.println(ret);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long n = scanner.nextLong(); n scanner.nextLong() scanner.nextLong scanner int ret = String.valueOf(n).length(); ret String.valueOf(n).length() String.valueOf(n).length String.valueOf(n) String.valueOf String n for (long i = 1; i <= n/i ; i++) {
            if (n%i==0) {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            }
        } long i = 1; long i = 1; i 1 i <= n/i i n/i n i i++ i++ i {
            if (n%i==0) {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            }
        } {
            if (n%i==0) {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            }
        } if (n%i==0) {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            } n%i==0 n%i n i 0 {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            } ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length())) ret Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length())) Math.min Math ret Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()) Math.max Math String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i String.valueOf(n / i).length() String.valueOf(n / i).length String.valueOf(n / i) String.valueOf String n / i n i System.out.println(ret) System.out.println System.out System System.out ret String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();

        int ret = String.valueOf(n).length();

        for (long i = 1; i <= n/i ; i++) {
            if (n%i==0) {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            }
        }
        System.out.println(ret);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();

        int ret = String.valueOf(n).length();

        for (long i = 1; i <= n/i ; i++) {
            if (n%i==0) {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            }
        }
        System.out.println(ret);
    }
} Main
import java.util.Scanner;

/**
 * Created by zzt on 17-3-26.
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();

        int ret = String.valueOf(n).length();

        for (long i = 1; i <= n/i ; i++) {
            if (n%i==0) {
                ret = Math.min(ret, Math.max(String.valueOf(i).length(), String.valueOf(n / i).length()));
            }
        }
        System.out.println(ret);
    }
}