public static void main ( String [ ] args ) throws IOException {
  BufferedReader r = new BufferedReader ( new InputStreamReader ( System . in ) , 1 ) ;
  String [ ] sl = r . readLine ( ) . split ( "[\\s]+" ) ;
  int a = Integer . parseInt ( sl [ 0 ] ) ;
  int b = Integer . parseInt ( sl [ 1 ] ) ;
  int c = Integer . parseInt ( sl [ 2 ] ) ;
  if ( a > b ) {
    int t = a ;
    a = b ;
    b = t ;
  }
  if ( b > c ) {
    int t = b ;
    b = c ;
    c = t ;
  }
  if ( a > b ) {
    int t = a ;
    a = b ;
    b = t ;
  }
  if ( a == b && b == c ) {
    System . out . println ( 0 ) ;
    System . exit ( 0 ) ;
  }
  if ( b == c ) {
    if ( ( b - a ) % 2 == 0 ) {
      System . out . println ( ( b - a ) / 2 ) ;
      System . exit ( 0 ) ;
    }
    else {
      System . out . println ( ( b - a + 1 ) / 2 + 1 ) ;
      System . exit ( 0 ) ;
    }
  }
  if ( a == b ) {
    System . out . println ( c - a ) ;
    System . exit ( 0 ) ;
  }
  int v = 0 ;
  v += c - b ;
  a += c - b ;
  b += c - b ;
  if ( ( b - a ) % 2 == 0 ) {
    System . out . println ( v + ( b - a ) / 2 ) ;
    System . exit ( 0 ) ;
  }
  else {
    System . out . println ( v + ( b - a + 1 ) / 2 + 1 ) ;
    System . exit ( 0 ) ;
  }
}

public static void main ( String [ ] args ) throws IOException { BufferedReader r = new BufferedReader ( new InputStreamReader ( System . in ) , 1 ) ; String [ ] sl = r . readLine ( ) . split ( " [ \\ s ] + " ) ; int a = Integer . parseInt ( sl [ 0 ] ) ; int b = Integer . parseInt ( sl [ 1 ] ) ; int c = Integer . parseInt ( sl [ 2 ] ) ; if ( a > b ) { int t = a ; a = b ; b = t ; } if ( b > c ) { int t = b ; b = c ; c = t ; } if ( a > b ) { int t = a ; a = b ; b = t ; } if ( a == b && b == c ) { System . out . println ( 0 ) ; System . exit ( 0 ) ; } if ( b == c ) { if ( ( b - a ) % 2 == 0 ) { System . out . println ( ( b - a ) / 2 ) ; System . exit ( 0 ) ; } else { System . out . println ( ( b - a + 1 ) / 2 + 1 ) ; System . exit ( 0 ) ; } } if ( a == b ) { System . out . println ( c - a ) ; System . exit ( 0 ) ; } int v = 0 ; v += c - b ; a += c - b ; b += c - b ; if ( ( b - a ) % 2 == 0 ) { System . out . println ( v + ( b - a ) / 2 ) ; System . exit ( 0 ) ; } else { System . out . println ( v + ( b - a + 1 ) / 2 + 1 ) ; System . exit ( 0 ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))) (decimal_integer_literal))))) (local_variable_declaration type: (array_type element: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (string_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (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: (decimal_integer_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) right: (decimal_integer_literal)) right: (decimal_integer_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) right: (decimal_integer_literal))) right: (decimal_integer_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))))))