public static void main ( final String [ ] args ) {
  try ( final Scanner sc = new Scanner ( System . in ) ) {
    final int H = sc . nextInt ( ) ;
    final int W = sc . nextInt ( ) ;
    final int h = sc . nextInt ( ) ;
    final int w = sc . nextInt ( ) ;
    final int total = H * W ;
    System . out . println ( total - ( h * W + ( H - h ) * w ) ) ;
  }
}

public static void main ( final String [ ] args ) { try ( final Scanner sc = new Scanner ( System . in ) ) { final int H = sc . nextInt ( ) ; final int W = sc . nextInt ( ) ; final int h = sc . nextInt ( ) ; final int w = sc . nextInt ( ) ; final int total = H * W ; System . out . println ( total - ( h * W + ( H - h ) * w ) ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter (modifiers) type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (try_with_resources_statement resources: (resource_specification (resource (modifiers) type: (type_identifier) name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) body: (block (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier))))))))))))