import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long a, b = 0;
        long n = Long.parseLong(br.readLine());
        int digits, mindigits = 11;
        
        for (a = 1; a <= Math.sqrt(n); a++) {
            if (n % a == 0) {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            }
        }
        
        System.out.println(mindigits);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Map; Map java.util import java.util.HashMap; HashMap java.util import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long a, b = 0;
        long n = Long.parseLong(br.readLine());
        int digits, mindigits = 11;
        
        for (a = 1; a <= Math.sqrt(n); a++) {
            if (n % a == 0) {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            }
        }
        
        System.out.println(mindigits);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long a, b = 0;
        long n = Long.parseLong(br.readLine());
        int digits, mindigits = 11;
        
        for (a = 1; a <= Math.sqrt(n); a++) {
            if (n % a == 0) {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            }
        }
        
        System.out.println(mindigits);
    } main {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long a, b = 0;
        long n = Long.parseLong(br.readLine());
        int digits, mindigits = 11;
        
        for (a = 1; a <= Math.sqrt(n); a++) {
            if (n % a == 0) {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            }
        }
        
        System.out.println(mindigits);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) long a a b = 0; b 0 long n = Long.parseLong(br.readLine()); n Long.parseLong(br.readLine()) Long.parseLong Long br.readLine() br.readLine br int digits digits mindigits = 11; mindigits 11 for (a = 1; a <= Math.sqrt(n); a++) {
            if (n % a == 0) {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            }
        } a = 1; a = 1 a 1 a <= Math.sqrt(n) a Math.sqrt(n) Math.sqrt Math n a++ a++ a {
            if (n % a == 0) {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            }
        } {
            if (n % a == 0) {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            }
        } if (n % a == 0) {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            } n % a == 0 n % a n a 0 {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            } b = n / a b n / a n a digits = String.valueOf(Math.max(a, b)).length() digits String.valueOf(Math.max(a, b)).length() String.valueOf(Math.max(a, b)).length String.valueOf(Math.max(a, b)) String.valueOf String Math.max(a, b) Math.max Math a b if (digits  < mindigits) mindigits = digits; digits  < mindigits digits mindigits mindigits = digits mindigits digits System.out.println(mindigits) System.out.println System.out System System.out mindigits String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long a, b = 0;
        long n = Long.parseLong(br.readLine());
        int digits, mindigits = 11;
        
        for (a = 1; a <= Math.sqrt(n); a++) {
            if (n % a == 0) {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            }
        }
        
        System.out.println(mindigits);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long a, b = 0;
        long n = Long.parseLong(br.readLine());
        int digits, mindigits = 11;
        
        for (a = 1; a <= Math.sqrt(n); a++) {
            if (n % a == 0) {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            }
        }
        
        System.out.println(mindigits);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long a, b = 0;
        long n = Long.parseLong(br.readLine());
        int digits, mindigits = 11;
        
        for (a = 1; a <= Math.sqrt(n); a++) {
            if (n % a == 0) {
                b = n / a;
                digits = String.valueOf(Math.max(a, b)).length();
                if (digits  < mindigits) mindigits = digits;
            }
        }
        
        System.out.println(mindigits);
    }
}
