public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( System . in ) ;
  int x1 = sc . nextInt ( ) ;
  int y1 = sc . nextInt ( ) ;
  int r1 = sc . nextInt ( ) ;
  int x2 = sc . nextInt ( ) ;
  int y2 = sc . nextInt ( ) ;
  int r2 = sc . nextInt ( ) ;
  double d = Math . sqrt ( Math . pow ( x1 - x2 , 2 ) + Math . pow ( y1 - y2 , 2 ) ) ;
  if ( Math . pow ( x1 , 2 ) + Math . pow ( y1 , 2 ) == Math . pow ( r1 , 2 ) && Math . pow ( x2 , 2 ) + Math . pow ( y2 , 2 ) == Math . pow ( r2 , 2 ) ) {
    System . out . println ( 0 ) ;
  }
  else if ( d <= ( double ) ( r1 + r2 ) && 2 * d >= ( double ) ( r1 + r2 ) ) {
    System . out . println ( 0 ) ;
  }
  else if ( d < ( double ) Math . max ( r1 , r2 ) ) {
    System . out . println ( ( ( double ) Math . max ( r1 , r2 ) - ( d + ( double ) Math . min ( r1 , r2 ) ) ) / 2 ) ;
  }
  else {
    System . out . println ( ( d - ( double ) ( r1 + r2 ) ) / 2 ) ;
  }
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int x1 = sc . nextInt ( ) ; int y1 = sc . nextInt ( ) ; int r1 = sc . nextInt ( ) ; int x2 = sc . nextInt ( ) ; int y2 = sc . nextInt ( ) ; int r2 = sc . nextInt ( ) ; double d = Math . sqrt ( Math . pow ( x1 - x2 , 2 ) + Math . pow ( y1 - y2 , 2 ) ) ; if ( Math . pow ( x1 , 2 ) + Math . pow ( y1 , 2 ) == Math . pow ( r1 , 2 ) && Math . pow ( x2 , 2 ) + Math . pow ( y2 , 2 ) == Math . pow ( r2 , 2 ) ) { System . out . println ( 0 ) ; } else if ( d <= ( double ) ( r1 + r2 ) && 2 * d >= ( double ) ( r1 + r2 ) ) { System . out . println ( 0 ) ; } else if ( d < ( double ) Math . max ( r1 , r2 ) ) { System . out . println ( ( ( double ) Math . max ( r1 , r2 ) - ( d + ( double ) Math . min ( r1 , r2 ) ) ) / 2 ) ; } else { System . out . println ( ( d - ( double ) ( r1 + r2 ) ) / 2 ) ; } }
(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)))) (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: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (decimal_integer_literal))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (decimal_integer_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal)))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal)))) right: (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal)))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal)))))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (floating_point_type) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) right: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (cast_expression type: (floating_point_type) value: (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 (decimal_integer_literal))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (floating_point_type) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))))) 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: (cast_expression type: (floating_point_type) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (floating_point_type) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))))))) right: (decimal_integer_literal)))))) alternative: (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: (cast_expression type: (floating_point_type) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) right: (decimal_integer_literal)))))))))))