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);
	}
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz