Time limit 500/500/500/500 ms. Memory limit 65000/65000/65000/65000 Kb.
Problem description
A candy weighs X grams, an orange Y grams and an apple Z grams. The Santa Claus has a bag which can hold exactly W grams. Write a program that will determine number of different options of packing a full bag of presents.
Input
There are 4 integers X, Y, Z, W in a single line of input (1 ≤ X, Y, Z ≤ 100, 1 ≤ W ≤ 1000).
Output
Write number of diferent options for the Santa Claus.
Example
| stdin |
stdout |
| 10 25 15 40 |
3 |
*4 candies, 1 orange and 1 apple, 1 candy and 2 apples Для отправки решений необходимо выполнить вход.
|