import java.io.*;
import java.util.*;
import java.lang.*;
import static java.lang.System.*;
public class Main
{
public static void  main (String args[])throws Exception
{
Scanner sc=new Scanner(in);
long n=sc.nextLong();
int ans=10000;
for(int i=1;i<=(int)(Math.sqrt(n))+2;i++)
{
	if(n%i==0)
	{
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	}
}
out.println(ans);
}
} import java.io.*; io.* java import java.util.*; util.* java import java.lang.*; lang.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main
{
public static void  main (String args[])throws Exception
{
Scanner sc=new Scanner(in);
long n=sc.nextLong();
int ans=10000;
for(int i=1;i<=(int)(Math.sqrt(n))+2;i++)
{
	if(n%i==0)
	{
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	}
}
out.println(ans);
}
} Main public static void  main (String args[])throws Exception
{
Scanner sc=new Scanner(in);
long n=sc.nextLong();
int ans=10000;
for(int i=1;i<=(int)(Math.sqrt(n))+2;i++)
{
	if(n%i==0)
	{
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	}
}
out.println(ans);
} main {
Scanner sc=new Scanner(in);
long n=sc.nextLong();
int ans=10000;
for(int i=1;i<=(int)(Math.sqrt(n))+2;i++)
{
	if(n%i==0)
	{
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	}
}
out.println(ans);
} Scanner sc=new Scanner(in); sc new Scanner(in) long n=sc.nextLong(); n sc.nextLong() sc.nextLong sc int ans=10000; ans 10000 for(int i=1;i<=(int)(Math.sqrt(n))+2;i++)
{
	if(n%i==0)
	{
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	}
} int i=1; int i=1; i 1 i<=(int)(Math.sqrt(n))+2 i (int)(Math.sqrt(n))+2 (int)(Math.sqrt(n)) Math.sqrt Math n 2 i++ i++ i {
	if(n%i==0)
	{
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	}
} {
	if(n%i==0)
	{
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	}
} if(n%i==0)
	{
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	} n%i==0 n%i n i 0 {
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	} String a=String.valueOf(i); a String.valueOf(i) String.valueOf String i String b=String.valueOf(n/i); b String.valueOf(n/i) String.valueOf String n/i n i int c=Math.max(a.length(),b.length()); c Math.max(a.length(),b.length()) Math.max Math a.length() a.length a b.length() b.length b if(c<=ans)
		ans=c; c<=ans c ans ans=c ans c out.println(ans) out.println out ans String args[] args public class Main
{
public static void  main (String args[])throws Exception
{
Scanner sc=new Scanner(in);
long n=sc.nextLong();
int ans=10000;
for(int i=1;i<=(int)(Math.sqrt(n))+2;i++)
{
	if(n%i==0)
	{
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	}
}
out.println(ans);
}
} public class Main
{
public static void  main (String args[])throws Exception
{
Scanner sc=new Scanner(in);
long n=sc.nextLong();
int ans=10000;
for(int i=1;i<=(int)(Math.sqrt(n))+2;i++)
{
	if(n%i==0)
	{
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	}
}
out.println(ans);
}
} Main
import java.io.*;
import java.util.*;
import java.lang.*;
import static java.lang.System.*;
public class Main
{
public static void  main (String args[])throws Exception
{
Scanner sc=new Scanner(in);
long n=sc.nextLong();
int ans=10000;
for(int i=1;i<=(int)(Math.sqrt(n))+2;i++)
{
	if(n%i==0)
	{
		String a=String.valueOf(i);
		String b=String.valueOf(n/i);
		int c=Math.max(a.length(),b.length());
		if(c<=ans)
		ans=c;

	}
}
out.println(ans);
}
}