public static void main ( String args [ ] ) throws Exception {
  StringTokenizer stok = new StringTokenizer ( new Scanner ( System . in ) . useDelimiter ( "\\A" ) . next ( ) ) ;
  StringBuilder sb = new StringBuilder ( ) ;
  int a1 = Integer . parseInt ( stok . nextToken ( ) ) ;
  int a2 = Integer . parseInt ( stok . nextToken ( ) ) ;
  int a3 = Integer . parseInt ( stok . nextToken ( ) ) ;
  int a4 = Integer . parseInt ( stok . nextToken ( ) ) ;
  int a5 = Integer . parseInt ( stok . nextToken ( ) ) ;
  int a6 = Integer . parseInt ( stok . nextToken ( ) ) ;
  int v = a1 ;
  long tot = 0 ;
  for ( int i = 0 ;
  i < Math . min ( a2 , a6 ) ;
  i ++ , v ++ ) tot += v * 2 + 1 ;
  for ( int i = Math . min ( a2 , a6 ) ;
  i < Math . max ( a2 , a6 ) ;
  i ++ ) tot += 2 * v ;
  for ( int i = Math . max ( a2 , a6 ) ;
  i < a2 + a3 ;
  i ++ , v -- ) tot += 2 * v - 1 ;
  System . out . println ( tot ) ;
}

public static void main ( String args [ ] ) throws Exception { StringTokenizer stok = new StringTokenizer ( new Scanner ( System . in ) . useDelimiter ( " \\ A " ) . next ( ) ) ; StringBuilder sb = new StringBuilder ( ) ; int a1 = Integer . parseInt ( stok . nextToken ( ) ) ; int a2 = Integer . parseInt ( stok . nextToken ( ) ) ; int a3 = Integer . parseInt ( stok . nextToken ( ) ) ; int a4 = Integer . parseInt ( stok . nextToken ( ) ) ; int a5 = Integer . parseInt ( stok . nextToken ( ) ) ; int a6 = Integer . parseInt ( stok . nextToken ( ) ) ; int v = a1 ; long tot = 0 ; for ( int i = 0 ; i < Math . min ( a2 , a6 ) ; i ++ , v ++ ) tot += v * 2 + 1 ; for ( int i = Math . min ( a2 , a6 ) ; i < Math . max ( a2 , a6 ) ; i ++ ) tot += 2 * v ; for ( int i = Math . max ( a2 , a6 ) ; i < a2 + a3 ; i ++ , v -- ) tot += 2 * v - 1 ; System . out . println ( tot ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (method_invocation object: (method_invocation object: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))) name: (identifier) arguments: (argument_list (string_literal))) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (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)))))) (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)))))) (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)))))) (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)))))) (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)))))) (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)))))) (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))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))) update: (update_expression (identifier)) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))) condition: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (decimal_integer_literal) right: (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))) condition: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))) update: (update_expression (identifier)) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (decimal_integer_literal))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))