static int countSum ( int N , int L , int R ) {
  if ( L > R ) {
    return 0 ;
  }
  if ( N == 1 ) {
    return R - L + 1 ;
  }
  if ( N > 1 ) {
    return ( N - 2 ) * ( R - L ) + 1 ;
  }
  return 0 ;
}

static int countSum ( int N , int L , int R ) { if ( L > R ) { return 0 ; } if ( N == 1 ) { return R - L + 1 ; } if ( N > 1 ) { return ( N - 2 ) * ( R - L ) + 1 ; } return 0 ; }
(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)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (return_statement (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (return_statement (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (return_statement (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (decimal_integer_literal))))) (return_statement (decimal_integer_literal))))