import java.io.PrintStream;
import java.util.Scanner;

public class Main {
    static final Scanner     sc = new Scanner(System.in);
    static final PrintStream so = System.out;
    public static void main(String[] args) {
        long N = nlong();
        long maxA = 0;
        
        for (long a = 1; a <= Math.sqrt(N); a++) {
            if (N % a == 0) {
                maxA = a; 
            }
        }
        long b = N/maxA;
        so.println(keta(b));
    }

    private static int keta(long n) {
        int count = 0;
        while (n > 0) {
            count++;
            n /= 10;
        }
        return count;
    }

    private static long nlong() {
        return sc.nextLong();
    }

    private static int nint() {
        return sc.nextInt();
    }

    private static String nstr() {
        return sc.next();
    }

    private static char[] nchars() {
        return sc.next().toCharArray();
    }

    private static long[] nlongs(int n) {
        return nlongs(n, 0, 0);
    }
    
    private static int[] nints(int n) {
        return nints(n, 0, 0);
    }

    private static int[] nints(int n, int padL, int padR) {
        int[] a = new int[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nint();
        return a;
    }

    private static long[] nlongs(int n, int padL, int padR) {
        long[] a = new long[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nlong();
        return a;
    }
    
    private static String[] nstrs(int n) {
        String[] a = new String[n];
        for (int i = 0; i < n; i++)
            a[i] = nstr();
        return a;
    }
    
    private static char[][] nchars2D(int h, int w) {
        return nchars2D(h, w, 0);
    }
    
    private static char[][] nchars2D(int h, int w, int pad) {
        char[][] a2 = new char[h+pad*2][w+pad*2];
        for(int i = 0; i < h; i++)
            System.arraycopy(nchars(), 0, a2[pad+i], pad, w);
        return a2;
    }
} import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {
    static final Scanner     sc = new Scanner(System.in);
    static final PrintStream so = System.out;
    public static void main(String[] args) {
        long N = nlong();
        long maxA = 0;
        
        for (long a = 1; a <= Math.sqrt(N); a++) {
            if (N % a == 0) {
                maxA = a; 
            }
        }
        long b = N/maxA;
        so.println(keta(b));
    }

    private static int keta(long n) {
        int count = 0;
        while (n > 0) {
            count++;
            n /= 10;
        }
        return count;
    }

    private static long nlong() {
        return sc.nextLong();
    }

    private static int nint() {
        return sc.nextInt();
    }

    private static String nstr() {
        return sc.next();
    }

    private static char[] nchars() {
        return sc.next().toCharArray();
    }

    private static long[] nlongs(int n) {
        return nlongs(n, 0, 0);
    }
    
    private static int[] nints(int n) {
        return nints(n, 0, 0);
    }

    private static int[] nints(int n, int padL, int padR) {
        int[] a = new int[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nint();
        return a;
    }

    private static long[] nlongs(int n, int padL, int padR) {
        long[] a = new long[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nlong();
        return a;
    }
    
    private static String[] nstrs(int n) {
        String[] a = new String[n];
        for (int i = 0; i < n; i++)
            a[i] = nstr();
        return a;
    }
    
    private static char[][] nchars2D(int h, int w) {
        return nchars2D(h, w, 0);
    }
    
    private static char[][] nchars2D(int h, int w, int pad) {
        char[][] a2 = new char[h+pad*2][w+pad*2];
        for(int i = 0; i < h; i++)
            System.arraycopy(nchars(), 0, a2[pad+i], pad, w);
        return a2;
    }
} Main static final Scanner     sc = new Scanner(System.in); sc new Scanner(System.in) static final PrintStream so = System.out; so System.out System System.out public static void main(String[] args) {
        long N = nlong();
        long maxA = 0;
        
        for (long a = 1; a <= Math.sqrt(N); a++) {
            if (N % a == 0) {
                maxA = a; 
            }
        }
        long b = N/maxA;
        so.println(keta(b));
    } main {
        long N = nlong();
        long maxA = 0;
        
        for (long a = 1; a <= Math.sqrt(N); a++) {
            if (N % a == 0) {
                maxA = a; 
            }
        }
        long b = N/maxA;
        so.println(keta(b));
    } long N = nlong(); N nlong() nlong long maxA = 0; maxA 0 for (long a = 1; a <= Math.sqrt(N); a++) {
            if (N % a == 0) {
                maxA = a; 
            }
        } long a = 1; long a = 1; a 1 a <= Math.sqrt(N) a Math.sqrt(N) Math.sqrt Math N a++ a++ a {
            if (N % a == 0) {
                maxA = a; 
            }
        } {
            if (N % a == 0) {
                maxA = a; 
            }
        } if (N % a == 0) {
                maxA = a; 
            } N % a == 0 N % a N a 0 {
                maxA = a; 
            } maxA = a maxA a long b = N/maxA; b N/maxA N maxA so.println(keta(b)) so.println so keta(b) keta b String[] args args private static int keta(long n) {
        int count = 0;
        while (n > 0) {
            count++;
            n /= 10;
        }
        return count;
    } keta {
        int count = 0;
        while (n > 0) {
            count++;
            n /= 10;
        }
        return count;
    } int count = 0; count 0 while (n > 0) {
            count++;
            n /= 10;
        } n > 0 n 0 {
            count++;
            n /= 10;
        } count++ count n /= 10 n 10 return count; count long n n private static long nlong() {
        return sc.nextLong();
    } nlong {
        return sc.nextLong();
    } return sc.nextLong(); sc.nextLong() sc.nextLong sc private static int nint() {
        return sc.nextInt();
    } nint {
        return sc.nextInt();
    } return sc.nextInt(); sc.nextInt() sc.nextInt sc private static String nstr() {
        return sc.next();
    } nstr {
        return sc.next();
    } return sc.next(); sc.next() sc.next sc private static char[] nchars() {
        return sc.next().toCharArray();
    } nchars {
        return sc.next().toCharArray();
    } return sc.next().toCharArray(); sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc private static long[] nlongs(int n) {
        return nlongs(n, 0, 0);
    } nlongs {
        return nlongs(n, 0, 0);
    } return nlongs(n, 0, 0); nlongs(n, 0, 0) nlongs n 0 0 int n n private static int[] nints(int n) {
        return nints(n, 0, 0);
    } nints {
        return nints(n, 0, 0);
    } return nints(n, 0, 0); nints(n, 0, 0) nints n 0 0 int n n private static int[] nints(int n, int padL, int padR) {
        int[] a = new int[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nint();
        return a;
    } nints {
        int[] a = new int[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nint();
        return a;
    } int[] a = new int[padL + n + padR]; a new int[padL + n + padR] padL + n + padR padL + n + padR padL n padR for (int i = 0; i < n; i++)
            a[padL + i] = nint(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[padL + i] = nint(); a[padL + i] = nint() a[padL + i] a padL + i padL i nint() nint return a; a int n n int padL padL int padR padR private static long[] nlongs(int n, int padL, int padR) {
        long[] a = new long[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nlong();
        return a;
    } nlongs {
        long[] a = new long[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nlong();
        return a;
    } long[] a = new long[padL + n + padR]; a new long[padL + n + padR] padL + n + padR padL + n + padR padL n padR for (int i = 0; i < n; i++)
            a[padL + i] = nlong(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[padL + i] = nlong(); a[padL + i] = nlong() a[padL + i] a padL + i padL i nlong() nlong return a; a int n n int padL padL int padR padR private static String[] nstrs(int n) {
        String[] a = new String[n];
        for (int i = 0; i < n; i++)
            a[i] = nstr();
        return a;
    } nstrs {
        String[] a = new String[n];
        for (int i = 0; i < n; i++)
            a[i] = nstr();
        return a;
    } String[] a = new String[n]; a new String[n] n for (int i = 0; i < n; i++)
            a[i] = nstr(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = nstr(); a[i] = nstr() a[i] a i nstr() nstr return a; a int n n private static char[][] nchars2D(int h, int w) {
        return nchars2D(h, w, 0);
    } nchars2D {
        return nchars2D(h, w, 0);
    } return nchars2D(h, w, 0); nchars2D(h, w, 0) nchars2D h w 0 int h h int w w private static char[][] nchars2D(int h, int w, int pad) {
        char[][] a2 = new char[h+pad*2][w+pad*2];
        for(int i = 0; i < h; i++)
            System.arraycopy(nchars(), 0, a2[pad+i], pad, w);
        return a2;
    } nchars2D {
        char[][] a2 = new char[h+pad*2][w+pad*2];
        for(int i = 0; i < h; i++)
            System.arraycopy(nchars(), 0, a2[pad+i], pad, w);
        return a2;
    } char[][] a2 = new char[h+pad*2][w+pad*2]; a2 new char[h+pad*2][w+pad*2] h+pad*2 h pad*2 pad 2 w+pad*2 w pad*2 pad 2 for(int i = 0; i < h; i++)
            System.arraycopy(nchars(), 0, a2[pad+i], pad, w); int i = 0; int i = 0; i 0 i < h i h i++ i++ i System.arraycopy(nchars(), 0, a2[pad+i], pad, w); System.arraycopy(nchars(), 0, a2[pad+i], pad, w) System.arraycopy System nchars() nchars 0 a2[pad+i] a2 pad+i pad i pad w return a2; a2 int h h int w w int pad pad public class Main {
    static final Scanner     sc = new Scanner(System.in);
    static final PrintStream so = System.out;
    public static void main(String[] args) {
        long N = nlong();
        long maxA = 0;
        
        for (long a = 1; a <= Math.sqrt(N); a++) {
            if (N % a == 0) {
                maxA = a; 
            }
        }
        long b = N/maxA;
        so.println(keta(b));
    }

    private static int keta(long n) {
        int count = 0;
        while (n > 0) {
            count++;
            n /= 10;
        }
        return count;
    }

    private static long nlong() {
        return sc.nextLong();
    }

    private static int nint() {
        return sc.nextInt();
    }

    private static String nstr() {
        return sc.next();
    }

    private static char[] nchars() {
        return sc.next().toCharArray();
    }

    private static long[] nlongs(int n) {
        return nlongs(n, 0, 0);
    }
    
    private static int[] nints(int n) {
        return nints(n, 0, 0);
    }

    private static int[] nints(int n, int padL, int padR) {
        int[] a = new int[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nint();
        return a;
    }

    private static long[] nlongs(int n, int padL, int padR) {
        long[] a = new long[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nlong();
        return a;
    }
    
    private static String[] nstrs(int n) {
        String[] a = new String[n];
        for (int i = 0; i < n; i++)
            a[i] = nstr();
        return a;
    }
    
    private static char[][] nchars2D(int h, int w) {
        return nchars2D(h, w, 0);
    }
    
    private static char[][] nchars2D(int h, int w, int pad) {
        char[][] a2 = new char[h+pad*2][w+pad*2];
        for(int i = 0; i < h; i++)
            System.arraycopy(nchars(), 0, a2[pad+i], pad, w);
        return a2;
    }
} public class Main {
    static final Scanner     sc = new Scanner(System.in);
    static final PrintStream so = System.out;
    public static void main(String[] args) {
        long N = nlong();
        long maxA = 0;
        
        for (long a = 1; a <= Math.sqrt(N); a++) {
            if (N % a == 0) {
                maxA = a; 
            }
        }
        long b = N/maxA;
        so.println(keta(b));
    }

    private static int keta(long n) {
        int count = 0;
        while (n > 0) {
            count++;
            n /= 10;
        }
        return count;
    }

    private static long nlong() {
        return sc.nextLong();
    }

    private static int nint() {
        return sc.nextInt();
    }

    private static String nstr() {
        return sc.next();
    }

    private static char[] nchars() {
        return sc.next().toCharArray();
    }

    private static long[] nlongs(int n) {
        return nlongs(n, 0, 0);
    }
    
    private static int[] nints(int n) {
        return nints(n, 0, 0);
    }

    private static int[] nints(int n, int padL, int padR) {
        int[] a = new int[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nint();
        return a;
    }

    private static long[] nlongs(int n, int padL, int padR) {
        long[] a = new long[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nlong();
        return a;
    }
    
    private static String[] nstrs(int n) {
        String[] a = new String[n];
        for (int i = 0; i < n; i++)
            a[i] = nstr();
        return a;
    }
    
    private static char[][] nchars2D(int h, int w) {
        return nchars2D(h, w, 0);
    }
    
    private static char[][] nchars2D(int h, int w, int pad) {
        char[][] a2 = new char[h+pad*2][w+pad*2];
        for(int i = 0; i < h; i++)
            System.arraycopy(nchars(), 0, a2[pad+i], pad, w);
        return a2;
    }
} Main
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
    static final Scanner     sc = new Scanner(System.in);
    static final PrintStream so = System.out;
    public static void main(String[] args) {
        long N = nlong();
        long maxA = 0;
        
        for (long a = 1; a <= Math.sqrt(N); a++) {
            if (N % a == 0) {
                maxA = a; 
            }
        }
        long b = N/maxA;
        so.println(keta(b));
    }

    private static int keta(long n) {
        int count = 0;
        while (n > 0) {
            count++;
            n /= 10;
        }
        return count;
    }

    private static long nlong() {
        return sc.nextLong();
    }

    private static int nint() {
        return sc.nextInt();
    }

    private static String nstr() {
        return sc.next();
    }

    private static char[] nchars() {
        return sc.next().toCharArray();
    }

    private static long[] nlongs(int n) {
        return nlongs(n, 0, 0);
    }
    
    private static int[] nints(int n) {
        return nints(n, 0, 0);
    }

    private static int[] nints(int n, int padL, int padR) {
        int[] a = new int[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nint();
        return a;
    }

    private static long[] nlongs(int n, int padL, int padR) {
        long[] a = new long[padL + n + padR];
        for (int i = 0; i < n; i++)
            a[padL + i] = nlong();
        return a;
    }
    
    private static String[] nstrs(int n) {
        String[] a = new String[n];
        for (int i = 0; i < n; i++)
            a[i] = nstr();
        return a;
    }
    
    private static char[][] nchars2D(int h, int w) {
        return nchars2D(h, w, 0);
    }
    
    private static char[][] nchars2D(int h, int w, int pad) {
        char[][] a2 = new char[h+pad*2][w+pad*2];
        for(int i = 0; i < h; i++)
            System.arraycopy(nchars(), 0, a2[pad+i], pad, w);
        return a2;
    }
}
