static int findMaximum ( int l , int p , int q , int r ) {
  int dp [ ] = new int [ l + 1 ] ;
  for ( int i = 0 ;
  i < l + 1 ;
  i ++ ) dp [ i ] = - 1 ;
  dp [ 0 ] = 0 ;
  for ( int i = 0 ;
  i <= l ;
  i ++ ) {
    if ( dp [ i ] == - 1 ) continue ;
    if ( i + p <= l ) dp [ i + p ] = Math . max ( dp [ i + p ] , dp [ i ] + 1 ) ;
    if ( i + q <= l ) dp [ i + q ] = Math . max ( dp [ i + q ] , dp [ i ] + 1 ) ;
    if ( i + r <= l ) dp [ i + r ] = Math . max ( dp [ i + r ] , dp [ i ] + 1 ) ;
  }
  return dp [ l ] ;
}

static int findMaximum ( int l , int p , int q , int r ) { int dp [ ] = new int [ l + 1 ] ; for ( int i = 0 ; i < l + 1 ; i ++ ) dp [ i ] = - 1 ; dp [ 0 ] = 0 ; for ( int i = 0 ; i <= l ; i ++ ) { if ( dp [ i ] == - 1 ) continue ; if ( i + p <= l ) dp [ i + p ] = Math . max ( dp [ i + p ] , dp [ i ] + 1 ) ; if ( i + q <= l ) dp [ i + q ] = Math . max ( dp [ i + q ] , dp [ i ] + 1 ) ; if ( i + r <= l ) dp [ i + r ] = Math . max ( dp [ i + r ] , dp [ i ] + 1 ) ; } return dp [ l ] ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (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: (binary_expression left: (identifier) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (unary_expression operand: (decimal_integer_literal))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (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: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (unary_expression operand: (decimal_integer_literal)))) consequence: (continue_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))) consequence: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier))) (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))) consequence: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier))) (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))) consequence: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier))) (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))))))))) (return_statement (array_access array: (identifier) index: (identifier)))))