import java.util.*;

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

    int t1 = (int) Math.sqrt(k);

    if (t1*t1 == k){
      String t = t1+"";
      int g = t.length();
      System.out.println(g);
      return;
    }

    for (int i=t1;i>=1;i--){
      if (k % i == 0){
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      }
    }

  }

} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    long k = scan.nextLong();

    int t1 = (int) Math.sqrt(k);

    if (t1*t1 == k){
      String t = t1+"";
      int g = t.length();
      System.out.println(g);
      return;
    }

    for (int i=t1;i>=1;i--){
      if (k % i == 0){
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      }
    }

  }

} Main public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    long k = scan.nextLong();

    int t1 = (int) Math.sqrt(k);

    if (t1*t1 == k){
      String t = t1+"";
      int g = t.length();
      System.out.println(g);
      return;
    }

    for (int i=t1;i>=1;i--){
      if (k % i == 0){
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      }
    }

  } main {
    Scanner scan = new Scanner(System.in);
    long k = scan.nextLong();

    int t1 = (int) Math.sqrt(k);

    if (t1*t1 == k){
      String t = t1+"";
      int g = t.length();
      System.out.println(g);
      return;
    }

    for (int i=t1;i>=1;i--){
      if (k % i == 0){
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      }
    }

  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long k = scan.nextLong(); k scan.nextLong() scan.nextLong scan int t1 = (int) Math.sqrt(k); t1 (int) Math.sqrt(k) Math.sqrt Math k if (t1*t1 == k){
      String t = t1+"";
      int g = t.length();
      System.out.println(g);
      return;
    } t1*t1 == k t1*t1 t1 t1 k {
      String t = t1+"";
      int g = t.length();
      System.out.println(g);
      return;
    } String t = t1+""; t t1+"" t1 "" int g = t.length(); g t.length() t.length t System.out.println(g) System.out.println System.out System System.out g return; for (int i=t1;i>=1;i--){
      if (k % i == 0){
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      }
    } int i=t1; int i=t1; i t1 i>=1 i 1 i-- i-- i {
      if (k % i == 0){
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      }
    } {
      if (k % i == 0){
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      }
    } if (k % i == 0){
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      } k % i == 0 k % i k i 0 {
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      } long q = (long) k/i; q (long) k/i (long) k i String a1 = q+""; a1 q+"" q "" System.out.println(a1.length()) System.out.println System.out System System.out a1.length() a1.length a1 return; String[] args args public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    long k = scan.nextLong();

    int t1 = (int) Math.sqrt(k);

    if (t1*t1 == k){
      String t = t1+"";
      int g = t.length();
      System.out.println(g);
      return;
    }

    for (int i=t1;i>=1;i--){
      if (k % i == 0){
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      }
    }

  }

} public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    long k = scan.nextLong();

    int t1 = (int) Math.sqrt(k);

    if (t1*t1 == k){
      String t = t1+"";
      int g = t.length();
      System.out.println(g);
      return;
    }

    for (int i=t1;i>=1;i--){
      if (k % i == 0){
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      }
    }

  }

} Main
import java.util.*;

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

    int t1 = (int) Math.sqrt(k);

    if (t1*t1 == k){
      String t = t1+"";
      int g = t.length();
      System.out.println(g);
      return;
    }

    for (int i=t1;i>=1;i--){
      if (k % i == 0){
        long q = (long) k/i;
        String a1 = q+"";
        System.out.println(a1.length());
        return;
      }
    }

  }

}
