public static void main ( String [ ] args ) {
  int one = min ( nextInt ( ) * 4 , nextInt ( ) * 2 , nextInt ( ) ) ;
  int two = nextInt ( ) ;
  int n = nextInt ( ) ;
  if ( one * 2 <= two ) {
    System . out . println ( ( long ) one * n ) ;
  }
  else {
    System . out . println ( ( long ) n / 2 * two + ( long ) n % 2 * one ) ;
  }
}

public static void main ( String [ ] args ) { int one = min ( nextInt ( ) * 4 , nextInt ( ) * 2 , nextInt ( ) ) ; int two = nextInt ( ) ; int n = nextInt ( ) ; if ( one * 2 <= two ) { System . out . println ( ( long ) one * n ) ; } else { System . out . println ( ( long ) n / 2 * two + ( long ) n % 2 * one ) ; } }
(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 name: (identifier) arguments: (argument_list (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)) (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)) (method_invocation name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (cast_expression type: (integral_type) value: (identifier)) right: (identifier)))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (cast_expression type: (integral_type) value: (identifier)) right: (decimal_integer_literal)) right: (identifier)) right: (binary_expression left: (binary_expression left: (cast_expression type: (integral_type) value: (identifier)) right: (decimal_integer_literal)) right: (identifier))))))))))