public static void main ( String [ ] $ ) {
  int a = scanner . nextInt ( ) , b = scanner . nextInt ( ) , c = scanner . nextInt ( ) , d = scanner . nextInt ( ) , e = scanner . nextInt ( ) ;
  Stream . of ( a + b + c , a + b + d , a + b + e , a + c + d , a + c + e , a + d + e , b + c + d , b + c + e , b + d + e , c + d + e ) . distinct ( ) . sorted ( Comparator . reverseOrder ( ) ) . skip ( 2 ) . findFirst ( ) . ifPresent ( System . out :: println ) ;
}

public static void main ( String [ ] $ ) { int a = scanner . nextInt ( ) , b = scanner . nextInt ( ) , c = scanner . nextInt ( ) , d = scanner . nextInt ( ) , e = scanner . nextInt ( ) ; Stream . of ( a + b + c , a + b + d , a + b + e , a + c + d , a + c + e , a + d + e , b + c + d , b + c + e , b + d + e , c + d + e ) . distinct ( ) . sorted ( Comparator . reverseOrder ( ) ) . skip ( 2 ) . findFirst ( ) . ifPresent ( System . out :: println ) ; }
(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))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (method_invocation object: (method_invocation object: (method_invocation object: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)))) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) name: (identifier) arguments: (argument_list (decimal_integer_literal))) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (method_reference (field_access object: (identifier) field: (identifier)) (identifier)))))))