Score : 200 points
Snuke has come to a store that sells boxes containing balls. The store sells the following three kinds of boxes:
Snuke wants to get a total of exactly N balls by buying r red boxes, g green boxes and b blue boxes. How many triples of non-negative integers (r,g,b) achieve this?
Input is given from Standard Input in the following format:
R G B N
Print the answer.
1 2 3 4
4
Four triples achieve the objective, as follows:
13 1 4 3000
87058