there are N items and a budget of D dollars
each item has a stock S (you can buy at most S of that item) A, B , and value X
the cost for k of that item is (A + (k-1)* B)
what is the maximum value can be attained given this budget ??
1 <= N <=2000
1<= D <= 5000
1<= X,S <= 10^7
0<= B <= A <= D