import java.util.*;
class Main
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = 0;
        for(int i = (int)Math.sqrt(n);i > 0 ; i--){
            if(n % i == 0){
                a = i;
                break;
            }
        }
        int cnt = 0;
        a = n / a;
        while(a > 0){
            a /= 10;
            cnt++;
        }
        System.out.println(cnt);
    }
} import java.util.*; util.* java class Main
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = 0;
        for(int i = (int)Math.sqrt(n);i > 0 ; i--){
            if(n % i == 0){
                a = i;
                break;
            }
        }
        int cnt = 0;
        a = n / a;
        while(a > 0){
            a /= 10;
            cnt++;
        }
        System.out.println(cnt);
    }
} Main public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = 0;
        for(int i = (int)Math.sqrt(n);i > 0 ; i--){
            if(n % i == 0){
                a = i;
                break;
            }
        }
        int cnt = 0;
        a = n / a;
        while(a > 0){
            a /= 10;
            cnt++;
        }
        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = 0;
        for(int i = (int)Math.sqrt(n);i > 0 ; i--){
            if(n % i == 0){
                a = i;
                break;
            }
        }
        int cnt = 0;
        a = n / a;
        while(a > 0){
            a /= 10;
            cnt++;
        }
        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long a = 0; a 0 for(int i = (int)Math.sqrt(n);i > 0 ; i--){
            if(n % i == 0){
                a = i;
                break;
            }
        } int i = (int)Math.sqrt(n); int i = (int)Math.sqrt(n); i (int)Math.sqrt(n) Math.sqrt Math n i > 0 i 0 i-- i-- i {
            if(n % i == 0){
                a = i;
                break;
            }
        } {
            if(n % i == 0){
                a = i;
                break;
            }
        } if(n % i == 0){
                a = i;
                break;
            } n % i == 0 n % i n i 0 {
                a = i;
                break;
            } a = i a i break; int cnt = 0; cnt 0 a = n / a a n / a n a while(a > 0){
            a /= 10;
            cnt++;
        } a > 0 a 0 {
            a /= 10;
            cnt++;
        } a /= 10 a 10 cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args
import java.util.*;
class Main
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = 0;
        for(int i = (int)Math.sqrt(n);i > 0 ; i--){
            if(n % i == 0){
                a = i;
                break;
            }
        }
        int cnt = 0;
        a = n / a;
        while(a > 0){
            a /= 10;
            cnt++;
        }
        System.out.println(cnt);
    }
}