import javax.print.DocFlavor;
import java.awt.*;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import java.util.List;

public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        long N = nextLong();
        for(int i=(int)Math.sqrt(N); i>=1; i--){
            if(N%i == 0){
                println(String.valueOf(N/i).length());
                break;
            }
        }
    }

    static long gcd (long a, long b) {
        long temp;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return b;
    }

    static long a(long n){
        return n < 2L ? 1L : n*a(n-2);
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

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

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
} import javax.print.DocFlavor; DocFlavor javax.print import java.awt.*; awt.* java import java.io.PrintWriter; PrintWriter java.io import java.lang.reflect.Array; Array java.lang.reflect import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java import java.util.List; List java.util public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        long N = nextLong();
        for(int i=(int)Math.sqrt(N); i>=1; i--){
            if(N%i == 0){
                println(String.valueOf(N/i).length());
                break;
            }
        }
    }

    static long gcd (long a, long b) {
        long temp;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return b;
    }

    static long a(long n){
        return n < 2L ? 1L : n*a(n-2);
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

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

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
} Main static String br = System.getProperty("line.separator"); br System.getProperty("line.separator") System.getProperty System "line.separator" static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) public static void main(String[] args) {
        long N = nextLong();
        for(int i=(int)Math.sqrt(N); i>=1; i--){
            if(N%i == 0){
                println(String.valueOf(N/i).length());
                break;
            }
        }
    } main {
        long N = nextLong();
        for(int i=(int)Math.sqrt(N); i>=1; i--){
            if(N%i == 0){
                println(String.valueOf(N/i).length());
                break;
            }
        }
    } long N = nextLong(); N nextLong() nextLong for(int i=(int)Math.sqrt(N); i>=1; i--){
            if(N%i == 0){
                println(String.valueOf(N/i).length());
                break;
            }
        } int i=(int)Math.sqrt(N); int i=(int)Math.sqrt(N); i (int)Math.sqrt(N) Math.sqrt Math N i>=1 i 1 i-- i-- i {
            if(N%i == 0){
                println(String.valueOf(N/i).length());
                break;
            }
        } {
            if(N%i == 0){
                println(String.valueOf(N/i).length());
                break;
            }
        } if(N%i == 0){
                println(String.valueOf(N/i).length());
                break;
            } N%i == 0 N%i N i 0 {
                println(String.valueOf(N/i).length());
                break;
            } println(String.valueOf(N/i).length()) println String.valueOf(N/i).length() String.valueOf(N/i).length String.valueOf(N/i) String.valueOf String N/i N i break; String[] args args static long gcd (long a, long b) {
        long temp;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return b;
    } gcd {
        long temp;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return b;
    } long temp; temp while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        } (temp = a % b) != 0 (temp = a % b) temp a % b a b 0 {
            a = b;
            b = temp;
        } a = b a b b = temp b temp return b; b long a a long b b static long a(long n){
        return n < 2L ? 1L : n*a(n-2);
    } a {
        return n < 2L ? 1L : n*a(n-2);
    } return n < 2L ? 1L : n*a(n-2); n < 2L ? 1L : n*a(n-2) n < 2L n 2L 1L n*a(n-2) n a(n-2) a n-2 n 2 long n n static int nextInt() {
        return Integer.parseInt(next());
    } nextInt {
        return Integer.parseInt(next());
    } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next static Long nextLong() {
        return Long.parseLong(next());
    } nextLong {
        return Long.parseLong(next());
    } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next static String next() {
        return sc.next();
    } next {
        return sc.next();
    } return sc.next(); sc.next() sc.next sc static String nextLine(){
        return sc.nextLine();
    } nextLine {
        return sc.nextLine();
    } return sc.nextLine(); sc.nextLine() sc.nextLine sc static void println(Object o) {
        out.println(o);
        out.flush();
    } println {
        out.println(o);
        out.flush();
    } out.println(o) out.println out o out.flush() out.flush out Object o o static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    } print {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    } PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) out.print(o) out.print out o out.flush() out.flush out Object o o public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        long N = nextLong();
        for(int i=(int)Math.sqrt(N); i>=1; i--){
            if(N%i == 0){
                println(String.valueOf(N/i).length());
                break;
            }
        }
    }

    static long gcd (long a, long b) {
        long temp;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return b;
    }

    static long a(long n){
        return n < 2L ? 1L : n*a(n-2);
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

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

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
} public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        long N = nextLong();
        for(int i=(int)Math.sqrt(N); i>=1; i--){
            if(N%i == 0){
                println(String.valueOf(N/i).length());
                break;
            }
        }
    }

    static long gcd (long a, long b) {
        long temp;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return b;
    }

    static long a(long n){
        return n < 2L ? 1L : n*a(n-2);
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

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

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
} Main
import javax.print.DocFlavor;
import java.awt.*;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import java.util.List;

public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        long N = nextLong();
        for(int i=(int)Math.sqrt(N); i>=1; i--){
            if(N%i == 0){
                println(String.valueOf(N/i).length());
                break;
            }
        }
    }

    static long gcd (long a, long b) {
        long temp;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return b;
    }

    static long a(long n){
        return n < 2L ? 1L : n*a(n-2);
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

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

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
}
