import scala.io.{StdIn => in}

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

  var cnt = 0
  for {
    i <- 0 to n/r
    j <- 0 to n/g
    k = n - i - j
  } {
    if((r*i + g*j + b*k) == n){
      cnt += 1
      // debug(i,k,k)
    }
  }

  val ans = cnt
  println(ans)

  def debug(any:Any*):Unit = {
    if(this.getClass.toString != "class Main$")
      println(any.mkString(" "))
  }
}