R, G, B, N = map(int, input().strip().split(" "))

count = 0

for r in range(N // R + 1):
    for g in range(N // G + 1):
        n = N - R * r - G * g
        if (n >= 0) and (n % B == 0):
            count += 1

print(count)