public static void main ( String [ ] args ) {
  int q = scanner . nextInt ( ) ;
  int h = scanner . nextInt ( ) ;
  int s = scanner . nextInt ( ) ;
  int d = scanner . nextInt ( ) ;
  int n = scanner . nextInt ( ) ;
  long min1 = Math . min ( q * 4L , Math . min ( h * 2L , s ) ) ;
  long min2 = Math . min ( min1 * 2L , d ) ;
  System . out . println ( n / 2 * min2 + ( n & 1 ) * min1 ) ;
}

public static void main ( String [ ] args ) { int q = scanner . nextInt ( ) ; int h = scanner . nextInt ( ) ; int s = scanner . nextInt ( ) ; int d = scanner . nextInt ( ) ; int n = scanner . nextInt ( ) ; long min1 = Math . min ( q * 4L , Math . min ( h * 2L , s ) ) ; long min2 = Math . min ( min1 * 2L , d ) ; System . out . println ( n / 2 * min2 + ( n & 1 ) * min1 ) ; }
(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)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))))) (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: (identifier) right: (decimal_integer_literal)) right: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (identifier))))))))