public static void main ( String [ ] args ) {
  Scanner scanner = new Scanner ( System . in ) ;
  int n1 = scanner . nextInt ( ) ;
  int n2 = scanner . nextInt ( ) ;
  int n3 = scanner . nextInt ( ) ;
  int min = Math . min ( Math . min ( n1 , n2 ) , n3 ) ;
  int max = Math . max ( Math . max ( n1 , n2 ) , n3 ) ;
  int [ ] arr = {
    n1 , n2 , n3 };
    int mid = Arrays . stream ( arr ) . filter ( e -> e != min && e != max ) . toArray ( ) [ 0 ] ;
    System . out . println ( ( max - mid ) + ( mid - min ) ) ;
  }
  
public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n1 = scanner . nextInt ( ) ; int n2 = scanner . nextInt ( ) ; int n3 = scanner . nextInt ( ) ; int min = Math . min ( Math . min ( n1 , n2 ) , n3 ) ; int max = Math . max ( Math . max ( n1 , n2 ) , n3 ) ; int [ ] arr = { n1 , n2 , n3 } ; int mid = Arrays . stream ( arr ) . filter ( e -> e != min && e != max ) . toArray ( ) [ 0 ] ; System . out . println ( ( max - mid ) + ( mid - min ) ) ; }
(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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))) (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))) (identifier))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_initializer (identifier) (identifier) (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (method_invocation object: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list (lambda_expression parameters: (identifier) body: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))))) name: (identifier) arguments: (argument_list)) index: (decimal_integer_literal)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))))))