public static void main ( String [ ] args ) {
  int a = Integer . parseInt ( sc . next ( ) ) ;
  int b = Integer . parseInt ( sc . next ( ) ) ;
  ArrayList < Double > list = new ArrayList < Double > ( ) ;
  double trate = 0 ;
  for ( int c = 0 ;
  c < a ;
  c ++ ) {
    if ( sc . hasNextInt ( ) ) {
      list . add ( Double . parseDouble ( sc . next ( ) ) ) ;
    }
  }
  if ( a != b ) {
    Collections . sort ( list ) ;
    for ( int r = a - b ;
    r < a ;
    r ++ ) {
      trate = ( trate + list . get ( r ) ) / 2 ;
    }
  }
  else {
    Collections . sort ( list ) ;
    for ( int r = 0 ;
    r < b ;
    r ++ ) {
      trate = ( trate + list . get ( r ) ) / 2 ;
    }
  }
  new DecimalFormat ( "0.000000" ) . format ( trate ) ;
  BigDecimal bd_trate = new BigDecimal ( trate ) ;
  bd_trate . setScale ( 6 , RoundingMode . HALF_UP ) ;
  System . out . println ( bd_trate ) ;
  sc . close ( ) ;
}

public static void main ( String [ ] args ) { int a = Integer . parseInt ( sc . next ( ) ) ; int b = Integer . parseInt ( sc . next ( ) ) ; ArrayList < Double > list = new ArrayList < Double > ( ) ; double trate = 0 ; for ( int c = 0 ; c < a ; c ++ ) { if ( sc . hasNextInt ( ) ) { list . add ( Double . parseDouble ( sc . next ( ) ) ) ; } } if ( a != b ) { Collections . sort ( list ) ; for ( int r = a - b ; r < a ; r ++ ) { trate = ( trate + list . get ( r ) ) / 2 ; } } else { Collections . sort ( list ) ; for ( int r = 0 ; r < b ; r ++ ) { trate = ( trate + list . get ( r ) ) / 2 ; } } new DecimalFormat ( "0.000000" ) . format ( trate ) ; BigDecimal bd_trate = new BigDecimal ( trate ) ; bd_trate . setScale ( 6 , RoundingMode . HALF_UP ) ; System . out . println ( bd_trate ) ; sc . close ( ) ; }
(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: (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)))))) (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)))))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) right: (decimal_integer_literal))))))) alternative: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) right: (decimal_integer_literal)))))))) (expression_statement (method_invocation object: (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))) name: (identifier) arguments: (argument_list (identifier)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (field_access object: (identifier) field: (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))