import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    long n = sc.nextLong();
    int ans = 10;

    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n % i == 0){
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      }
    }

    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    long n = sc.nextLong();
    int ans = 10;

    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n % i == 0){
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      }
    }

    System.out.println(ans);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    long n = sc.nextLong();
    int ans = 10;

    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n % i == 0){
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      }
    }

    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);

    long n = sc.nextLong();
    int ans = 10;

    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n % i == 0){
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      }
    }

    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int ans = 10; ans 10 for(int i = 1; i <= Math.sqrt(n); i++){
      if(n % i == 0){
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      }
    } int i = 1; int i = 1; i 1 i <= Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
      if(n % i == 0){
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      }
    } {
      if(n % i == 0){
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      }
    } if(n % i == 0){
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      } n % i == 0 n % i n i 0 {
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      } int buf = String.valueOf(n / i).length(); buf String.valueOf(n / i).length() String.valueOf(n / i).length String.valueOf(n / i) String.valueOf String n / i n i if(ans > buf){
          ans = buf;
        } ans > buf ans buf {
          ans = buf;
        } ans = buf ans buf System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    long n = sc.nextLong();
    int ans = 10;

    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n % i == 0){
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      }
    }

    System.out.println(ans);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    long n = sc.nextLong();
    int ans = 10;

    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n % i == 0){
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      }
    }

    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    long n = sc.nextLong();
    int ans = 10;

    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n % i == 0){
        int buf = String.valueOf(n / i).length();
        if(ans > buf){
          ans = buf;
        }
      }
    }

    System.out.println(ans);
  }
}
