import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        List<Long> list = getDivisor(n);
        if (list.size() == 1) {
            System.out.println(1);
            return;
        }
        int l1 = String.valueOf(list.get(list.size() - 1)).length();
        int l2 = String.valueOf(list.get(list.size() - 2)).length();
        System.out.println(Math.max(l1, l2));
    }

    private static List<Long> getDivisor(long n) {
        List<Long> list = new ArrayList<>();
        long i = 1;
        while (i <= n / i) {
            if (n % i == 0) {
                list.add(i);
                list.add(n / i);
            }
            i++;
        }
        return list;
    }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        List<Long> list = getDivisor(n);
        if (list.size() == 1) {
            System.out.println(1);
            return;
        }
        int l1 = String.valueOf(list.get(list.size() - 1)).length();
        int l2 = String.valueOf(list.get(list.size() - 2)).length();
        System.out.println(Math.max(l1, l2));
    }

    private static List<Long> getDivisor(long n) {
        List<Long> list = new ArrayList<>();
        long i = 1;
        while (i <= n / i) {
            if (n % i == 0) {
                list.add(i);
                list.add(n / i);
            }
            i++;
        }
        return list;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        List<Long> list = getDivisor(n);
        if (list.size() == 1) {
            System.out.println(1);
            return;
        }
        int l1 = String.valueOf(list.get(list.size() - 1)).length();
        int l2 = String.valueOf(list.get(list.size() - 2)).length();
        System.out.println(Math.max(l1, l2));
    } main {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        List<Long> list = getDivisor(n);
        if (list.size() == 1) {
            System.out.println(1);
            return;
        }
        int l1 = String.valueOf(list.get(list.size() - 1)).length();
        int l2 = String.valueOf(list.get(list.size() - 2)).length();
        System.out.println(Math.max(l1, l2));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = Long.parseLong(sc.next()); n Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc List<Long> list = getDivisor(n); list getDivisor(n) getDivisor n if (list.size() == 1) {
            System.out.println(1);
            return;
        } list.size() == 1 list.size() list.size list 1 {
            System.out.println(1);
            return;
        } System.out.println(1) System.out.println System.out System System.out 1 return; int l1 = String.valueOf(list.get(list.size() - 1)).length(); l1 String.valueOf(list.get(list.size() - 1)).length() String.valueOf(list.get(list.size() - 1)).length String.valueOf(list.get(list.size() - 1)) String.valueOf String list.get(list.size() - 1) list.get list list.size() - 1 list.size() list.size list 1 int l2 = String.valueOf(list.get(list.size() - 2)).length(); l2 String.valueOf(list.get(list.size() - 2)).length() String.valueOf(list.get(list.size() - 2)).length String.valueOf(list.get(list.size() - 2)) String.valueOf String list.get(list.size() - 2) list.get list list.size() - 2 list.size() list.size list 2 System.out.println(Math.max(l1, l2)) System.out.println System.out System System.out Math.max(l1, l2) Math.max Math l1 l2 String[] args args private static List<Long> getDivisor(long n) {
        List<Long> list = new ArrayList<>();
        long i = 1;
        while (i <= n / i) {
            if (n % i == 0) {
                list.add(i);
                list.add(n / i);
            }
            i++;
        }
        return list;
    } getDivisor {
        List<Long> list = new ArrayList<>();
        long i = 1;
        while (i <= n / i) {
            if (n % i == 0) {
                list.add(i);
                list.add(n / i);
            }
            i++;
        }
        return list;
    } List<Long> list = new ArrayList<>(); list new ArrayList<>() long i = 1; i 1 while (i <= n / i) {
            if (n % i == 0) {
                list.add(i);
                list.add(n / i);
            }
            i++;
        } i <= n / i i n / i n i {
            if (n % i == 0) {
                list.add(i);
                list.add(n / i);
            }
            i++;
        } if (n % i == 0) {
                list.add(i);
                list.add(n / i);
            } n % i == 0 n % i n i 0 {
                list.add(i);
                list.add(n / i);
            } list.add(i) list.add list i list.add(n / i) list.add list n / i n i i++ i return list; list long n n public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        List<Long> list = getDivisor(n);
        if (list.size() == 1) {
            System.out.println(1);
            return;
        }
        int l1 = String.valueOf(list.get(list.size() - 1)).length();
        int l2 = String.valueOf(list.get(list.size() - 2)).length();
        System.out.println(Math.max(l1, l2));
    }

    private static List<Long> getDivisor(long n) {
        List<Long> list = new ArrayList<>();
        long i = 1;
        while (i <= n / i) {
            if (n % i == 0) {
                list.add(i);
                list.add(n / i);
            }
            i++;
        }
        return list;
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        List<Long> list = getDivisor(n);
        if (list.size() == 1) {
            System.out.println(1);
            return;
        }
        int l1 = String.valueOf(list.get(list.size() - 1)).length();
        int l2 = String.valueOf(list.get(list.size() - 2)).length();
        System.out.println(Math.max(l1, l2));
    }

    private static List<Long> getDivisor(long n) {
        List<Long> list = new ArrayList<>();
        long i = 1;
        while (i <= n / i) {
            if (n % i == 0) {
                list.add(i);
                list.add(n / i);
            }
            i++;
        }
        return list;
    }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        List<Long> list = getDivisor(n);
        if (list.size() == 1) {
            System.out.println(1);
            return;
        }
        int l1 = String.valueOf(list.get(list.size() - 1)).length();
        int l2 = String.valueOf(list.get(list.size() - 2)).length();
        System.out.println(Math.max(l1, l2));
    }

    private static List<Long> getDivisor(long n) {
        List<Long> list = new ArrayList<>();
        long i = 1;
        while (i <= n / i) {
            if (n % i == 0) {
                list.add(i);
                list.add(n / i);
            }
            i++;
        }
        return list;
    }
}