public static void main ( String [ ] args ) {
  try {
    long n = Long . parseLong ( buffer . readLine ( ) ) ;
    n = n + 1 ;
    if ( n % 2 == 0 ) {
      logger . write ( n / 2 + "" ) ;
    }
    else {
      if ( n == 1 ) {
        n = 0 ;
      }
      logger . write ( n + "" ) ;
    }
    logger . flush ( ) ;
  }
  catch ( IOException exc ) {
  }
}

public static void main ( String [ ] args ) { try { long n = Long . parseLong ( buffer . readLine ( ) ) ; n = n + 1 ; if ( n % 2 == 0 ) { logger . write ( n / 2 + " " ) ; } else { if ( n == 1 ) { n = 0 ; } logger . write ( n + " " ) ; } logger . flush ( ) ; } catch ( IOException exc ) { } }
(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 (try_statement 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)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (string_literal)))))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (string_literal))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (catch_clause (catch_formal_parameter (catch_type (type_identifier)) name: (identifier)) body: (block)))))