object Main extends App {
    val Array(r,g,b,n) = io.StdIn.readLine.split(" ").map(_.toDouble)

    var count = 0
    for (count_r <- 0 to (n/r).ceil.toInt; count_g <- 0 to (n/g).ceil.toInt) {
        val amari = n-count_r*r-count_g*g
        if(0 <= amari/b && (amari%b) == 0) count += 1
    }
    println(count)
}