public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( System . in ) ;
  long N = sc . nextLong ( ) ;
  long divide1 = ( long ) Math . sqrt ( N ) ;
  while ( N % divide1 != 0 ) {
    divide1 -- ;
  }
  long divide2 = N / divide1 ;
  int len1 = String . valueOf ( divide1 ) . length ( ) ;
  int len2 = String . valueOf ( divide2 ) . length ( ) ;
  out . println ( Math . max ( len1 , len2 ) ) ;
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; long N = sc . nextLong ( ) ; long divide1 = ( long ) Math . sqrt ( N ) ; while ( N % divide1 != 0 ) { divide1 -- ; } long divide2 = N / divide1 ; int len1 = String . valueOf ( divide1 ) . length ( ) ; int len2 = String . valueOf ( divide2 ) . length ( ) ; out . println ( Math . max ( len1 , len2 ) ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (cast_expression type: (integral_type) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) body: (block (expression_statement (update_expression (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))))))