private static int output ( int [ ] stream ) {
  int out = 0 ;
  int a = stream [ 0 ] / stream [ 1 ] ;
  int left = stream [ 0 ] - ( stream [ 1 ] * a ) ;
  if ( left > stream [ 1 ] / 2 ) {
    left = stream [ 1 ] / 2 ;
  }
  return stream [ 1 ] * a + left ;
}

private static int output ( int [ ] stream ) { int out = 0 ; int a = stream [ 0 ] / stream [ 1 ] ; int left = stream [ 0 ] - ( stream [ 1 ] * a ) ; if ( left > stream [ 1 ] / 2 ) { left = stream [ 1 ] / 2 ; } return stream [ 1 ] * a + left ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal)))))) (return_statement (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (identifier)) right: (identifier)))))