import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static final long MAX = 10000000000l;
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            long n = Long.parseLong(br.readLine());
            long min = digit(n);
            for (long i = 1; i * i <= n; i++) {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            }
            System.out.println(min);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static int digit(long num) {
        return String.valueOf(num).length();
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static final long MAX = 10000000000l;
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            long n = Long.parseLong(br.readLine());
            long min = digit(n);
            for (long i = 1; i * i <= n; i++) {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            }
            System.out.println(min);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static int digit(long num) {
        return String.valueOf(num).length();
    }
} Main public static final long MAX = 10000000000l; MAX 10000000000l public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            long n = Long.parseLong(br.readLine());
            long min = digit(n);
            for (long i = 1; i * i <= n; i++) {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            }
            System.out.println(min);
        } catch (IOException e) {
            e.printStackTrace();
        }
    } main {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            long n = Long.parseLong(br.readLine());
            long min = digit(n);
            for (long i = 1; i * i <= n; i++) {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            }
            System.out.println(min);
        } catch (IOException e) {
            e.printStackTrace();
        }
    } try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            long n = Long.parseLong(br.readLine());
            long min = digit(n);
            for (long i = 1; i * i <= n; i++) {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            }
            System.out.println(min);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } IOException e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            long n = Long.parseLong(br.readLine());
            long min = digit(n);
            for (long i = 1; i * i <= n; i++) {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            }
            System.out.println(min);
        } InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) long n = Long.parseLong(br.readLine()); n Long.parseLong(br.readLine()) Long.parseLong Long br.readLine() br.readLine br long min = digit(n); min digit(n) digit n for (long i = 1; i * i <= n; i++) {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            } {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            } if (n % i != 0) {
                    continue;
                } n % i != 0 n % i n i 0 {
                    continue;
                } continue; long j = n / i; j n / i n i long temp = 0; temp 0 if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                } digit(i) > digit(j) digit(i) digit i digit(j) digit j {
                    temp = digit(i);
                } temp = digit(i) temp digit(i) digit i {
                    temp = digit(j);
                } temp = digit(j) temp digit(j) digit j if (min > temp) {
                    min = temp;
                } min > temp min temp {
                    min = temp;
                } min = temp min temp System.out.println(min) System.out.println System.out System System.out min String[] args args public static int digit(long num) {
        return String.valueOf(num).length();
    } digit {
        return String.valueOf(num).length();
    } return String.valueOf(num).length(); String.valueOf(num).length() String.valueOf(num).length String.valueOf(num) String.valueOf String num long num num public class Main {
    public static final long MAX = 10000000000l;
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            long n = Long.parseLong(br.readLine());
            long min = digit(n);
            for (long i = 1; i * i <= n; i++) {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            }
            System.out.println(min);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static int digit(long num) {
        return String.valueOf(num).length();
    }
} public class Main {
    public static final long MAX = 10000000000l;
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            long n = Long.parseLong(br.readLine());
            long min = digit(n);
            for (long i = 1; i * i <= n; i++) {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            }
            System.out.println(min);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static int digit(long num) {
        return String.valueOf(num).length();
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static final long MAX = 10000000000l;
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            long n = Long.parseLong(br.readLine());
            long min = digit(n);
            for (long i = 1; i * i <= n; i++) {
                if (n % i != 0) {
                    continue;
                }
                long j = n / i;
                long temp = 0;
                if (digit(i) > digit(j)) {
                    temp = digit(i);
                } else {
                    temp = digit(j);
                }
                if (min > temp) {
                    min = temp;
                }
            }
            System.out.println(min);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static int digit(long num) {
        return String.valueOf(num).length();
    }
}