object Main extends App {
  var read = scala.io.StdIn.readLine()
  val array =  read.split(" ").map(_.toInt).toVector
  val r = array(0)
  val g = array(1)
  val b = array(2)
  val n = array(3)
  var count = 0
  for{
    rc <- (0 to n / r)
    gc <- (0 to n / g)
    bc <- (0 to n / b)
  }{
    val sum = r * rc + g * gc + b * bc
    if ( sum != 0 && n == sum) {
      count += 1
    }
  }
  println(count)
}