public static int minStair ( int n , int m ) {
  if ( n < m ) {
    return - 1 ;
  }
  int minSteps = n / 2 + n % 2 ;
  int nextMultiple = m ;
  int i = 2 ;
  while ( true ) {
    if ( minSteps > nextMultiple ) {
      nextMultiple = m * i ;
    }
    else {
      break ;
    }
    i ++ ;
  }
  return nextMultiple ;
}

public static int minStair ( int n , int m ) { if ( n < m ) { return - 1 ; } int minSteps = n / 2 + n % 2 ; int nextMultiple = m ; int i = 2 ; while ( true ) { if ( minSteps > nextMultiple ) { nextMultiple = m * i ; } else { break ; } i ++ ; } return nextMultiple ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (return_statement (unary_expression operand: (decimal_integer_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (true)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))) alternative: (block (break_statement))) (expression_statement (update_expression (identifier))))) (return_statement (identifier))))