import java.util.*
import java.math.*

fun main(args: Array<String>) {
    var (R, G, B, N) = readLine()!!.split(" ").map { it.toInt() }
//    var N = readLine()!!.toInt()
//    val S = readLine()!!
//    val D = readLine()!!.split(" ").map { it.toLong() }
//    val A = readLine()!!.split(" ").map { it.toInt() }.toIntArray()

    var ans = 0
    var count = 0

    for (i in 0..N/R) {
        val r = i*R
        for (j in 0..N/G) {
            val rg = r+j*G
            if (rg > N) break
            if ((N-rg)%B == 0) ans++
        }
    }

    println(ans)
}
