Snuke has come to a store that sells boxes containing balls. The store sells the following three kinds of boxes:    * Red boxes, each containing R red balls   * Green boxes, each containing G green balls   * Blue boxes, each containing B blue balls  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?
r, g, b, n = [int(i) for i in input().split()]
print(r, g, b)

r, g, b = sorted([r, g, b])

ans = 0
divb = n // b
for i in range(divb+1):
    remain_n1 = n - b * i
    divg = remain_n1 // g
    for j in range(divg+1):
        remain_n2 = remain_n1 - g * j
        if remain_n2 % r == 0:
            ans += 1

print(ans)
r, g, b, n = [int(i) for i in input().split()]

r, g, b = sorted([r, g, b])

ans = 0
divb = int(n / b)
for i in range(divb+1):
    remain_n1 = n - b * i
    divg = int(remain_n1 / g)
    for j in range(divg+1):
        remain_n2 = remain_n1 - g * j
        if remain_n2 % r == 0:
            ans += 1

print(ans)