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(s) for s in input().split(" ")]
count = 0
for r in range(N//R):
  for g in range((N-r*R)//G):
    if (N-r*R-g*G)//B == 0:
      count += 1
      
print(count)
R, G, B, N = [int(s) for s in input().split(" ")]
count = 0
for r in range(N//R+1):
  for g in range((N-r*R)//G+1):
    if (N-r*R-g*G)%B == 0:
      count += 1
      
print(count)
