public static void main ( String [ ] args ) {
  int k2 = kb . nextInt ( ) ;
  int k3 = kb . nextInt ( ) ;
  int k5 = kb . nextInt ( ) ;
  int k6 = kb . nextInt ( ) ;
  int n_5 = Math . min ( Math . min ( k2 , k5 ) , k6 ) ;
  int n_3 = Math . min ( k3 , k2 - n_5 ) ;
  System . out . println ( 256 * n_5 + n_3 * 32 ) ;
}

public static void main ( String [ ] args ) { int k2 = kb . nextInt ( ) ; int k3 = kb . nextInt ( ) ; int k5 = kb . nextInt ( ) ; int k6 = kb . nextInt ( ) ; int n_5 = Math . min ( Math . min ( k2 , k5 ) , k6 ) ; int n_3 = Math . min ( k3 , k2 - n_5 ) ; System . out . println ( 256 * n_5 + n_3 * 32 ) ; }
(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 (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (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)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (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)))) (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 (identifier) (identifier))) (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (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: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))))))