import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main 
{
	public static void main(String[] args) throws IOException 
	{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		long N = Long.parseLong(br.readLine());
		int i = 10000000;
		long O = 0;
		long T = 0;
		int o = 0;
		int t = 0;
		for(long l = 1; l < (long)Math.sqrt(N) + 10; l++)
		{
			if(N % l == 0)
			{
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			}
		}
		System.out.println(i);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main 
{
	public static void main(String[] args) throws IOException 
	{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		long N = Long.parseLong(br.readLine());
		int i = 10000000;
		long O = 0;
		long T = 0;
		int o = 0;
		int t = 0;
		for(long l = 1; l < (long)Math.sqrt(N) + 10; l++)
		{
			if(N % l == 0)
			{
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			}
		}
		System.out.println(i);
	}
} Main public static void main(String[] args) throws IOException 
	{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		long N = Long.parseLong(br.readLine());
		int i = 10000000;
		long O = 0;
		long T = 0;
		int o = 0;
		int t = 0;
		for(long l = 1; l < (long)Math.sqrt(N) + 10; l++)
		{
			if(N % l == 0)
			{
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			}
		}
		System.out.println(i);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		long N = Long.parseLong(br.readLine());
		int i = 10000000;
		long O = 0;
		long T = 0;
		int o = 0;
		int t = 0;
		for(long l = 1; l < (long)Math.sqrt(N) + 10; l++)
		{
			if(N % l == 0)
			{
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			}
		}
		System.out.println(i);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) long N = Long.parseLong(br.readLine()); N Long.parseLong(br.readLine()) Long.parseLong Long br.readLine() br.readLine br int i = 10000000; i 10000000 long O = 0; O 0 long T = 0; T 0 int o = 0; o 0 int t = 0; t 0 for(long l = 1; l < (long)Math.sqrt(N) + 10; l++)
		{
			if(N % l == 0)
			{
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			}
		} long l = 1; long l = 1; l 1 l < (long)Math.sqrt(N) + 10 l (long)Math.sqrt(N) + 10 (long)Math.sqrt(N) Math.sqrt Math N 10 l++ l++ l {
			if(N % l == 0)
			{
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			}
		} {
			if(N % l == 0)
			{
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			}
		} if(N % l == 0)
			{
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			} N % l == 0 N % l N l 0 {
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			} O = l O l T = N / l T N / l N l o = (int) Math.log10(O) + 1 o (int) Math.log10(O) + 1 (int) Math.log10(O) Math.log10 Math O 1 t = (int) Math.log10(T) + 1 t (int) Math.log10(T) + 1 (int) Math.log10(T) Math.log10 Math T 1 if(i > (o > t ? o : t)) i = (o > t ? o : t); i > (o > t ? o : t) i (o > t ? o : t) o > t o t o t i = (o > t ? o : t) i (o > t ? o : t) o > t o t o t System.out.println(i) System.out.println System.out System System.out i String[] args args public class Main 
{
	public static void main(String[] args) throws IOException 
	{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		long N = Long.parseLong(br.readLine());
		int i = 10000000;
		long O = 0;
		long T = 0;
		int o = 0;
		int t = 0;
		for(long l = 1; l < (long)Math.sqrt(N) + 10; l++)
		{
			if(N % l == 0)
			{
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			}
		}
		System.out.println(i);
	}
} public class Main 
{
	public static void main(String[] args) throws IOException 
	{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		long N = Long.parseLong(br.readLine());
		int i = 10000000;
		long O = 0;
		long T = 0;
		int o = 0;
		int t = 0;
		for(long l = 1; l < (long)Math.sqrt(N) + 10; l++)
		{
			if(N % l == 0)
			{
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			}
		}
		System.out.println(i);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main 
{
	public static void main(String[] args) throws IOException 
	{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		long N = Long.parseLong(br.readLine());
		int i = 10000000;
		long O = 0;
		long T = 0;
		int o = 0;
		int t = 0;
		for(long l = 1; l < (long)Math.sqrt(N) + 10; l++)
		{
			if(N % l == 0)
			{
				O = l;
				T = N / l;
				o = (int) Math.log10(O) + 1;
				t = (int) Math.log10(T) + 1;
				if(i > (o > t ? o : t)) i = (o > t ? o : t);
			}
		}
		System.out.println(i);
	}
}
