
import java.util.*;

public class Main {
    private final static Main main = new Main();

    public static void main(String[] args) {
        main.contest();
    }

    private void contest() {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long res = Long.MAX_VALUE;
        for (long i=1; i*i<=n; ++i) {
            if (n%i != 0) {
                continue;
            }
            res = Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
        }
        System.out.println(res);
    }
} import java.util.*; util.* java public class Main {
    private final static Main main = new Main();

    public static void main(String[] args) {
        main.contest();
    }

    private void contest() {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long res = Long.MAX_VALUE;
        for (long i=1; i*i<=n; ++i) {
            if (n%i != 0) {
                continue;
            }
            res = Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
        }
        System.out.println(res);
    }
} Main private final static Main main = new Main(); main new Main() public static void main(String[] args) {
        main.contest();
    } main {
        main.contest();
    } main.contest() main.contest main String[] args args private void contest() {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long res = Long.MAX_VALUE;
        for (long i=1; i*i<=n; ++i) {
            if (n%i != 0) {
                continue;
            }
            res = Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
        }
        System.out.println(res);
    } contest {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long res = Long.MAX_VALUE;
        for (long i=1; i*i<=n; ++i) {
            if (n%i != 0) {
                continue;
            }
            res = Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
        }
        System.out.println(res);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long res = Long.MAX_VALUE; res Long.MAX_VALUE Long Long.MAX_VALUE for (long i=1; i*i<=n; ++i) {
            if (n%i != 0) {
                continue;
            }
            res = Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
        } long i=1; long i=1; i 1 i*i<=n i*i i i n ++i ++i i {
            if (n%i != 0) {
                continue;
            }
            res = Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
        } {
            if (n%i != 0) {
                continue;
            }
            res = Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
        } if (n%i != 0) {
                continue;
            } n%i != 0 n%i n i 0 {
                continue;
            } continue; res = Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length())) res Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length())) Math.min Math res 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(res) System.out.println System.out System System.out res public class Main {
    private final static Main main = new Main();

    public static void main(String[] args) {
        main.contest();
    }

    private void contest() {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long res = Long.MAX_VALUE;
        for (long i=1; i*i<=n; ++i) {
            if (n%i != 0) {
                continue;
            }
            res = Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
        }
        System.out.println(res);
    }
} public class Main {
    private final static Main main = new Main();

    public static void main(String[] args) {
        main.contest();
    }

    private void contest() {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long res = Long.MAX_VALUE;
        for (long i=1; i*i<=n; ++i) {
            if (n%i != 0) {
                continue;
            }
            res = Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
        }
        System.out.println(res);
    }
} Main

import java.util.*;

public class Main {
    private final static Main main = new Main();

    public static void main(String[] args) {
        main.contest();
    }

    private void contest() {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long res = Long.MAX_VALUE;
        for (long i=1; i*i<=n; ++i) {
            if (n%i != 0) {
                continue;
            }
            res = Math.min(res, Math.max(String.valueOf(i).length(), String.valueOf(n/i).length()));
        }
        System.out.println(res);
    }
}
