#import <stdio.h>
int main() {
    int r, g, b, n, ans = 0;
    scanf("%d %d %d %d", &r, &g, &b, &n);
    for (int x = 0; x <= n / r; x++) {
        for (int y = 0; y <= n / g; y++) {
            int p = n - r * x - g * y;
            if (p >= 0 && p % b == 0) ans++;
        }
    }
    printf("%d\n", ans);
}
