import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val r, g, b, n = sc.nextInt()
    
    var ans = 0L
    for (i <- 0 to (n / r)) {
      for (j <- 0 to (n / g)) {
        val m = i * r + j * g
        if ((n - m) % b == 0 && (n - m) / b >= 0) {
          ans += 1
        }
      }
    }
    
    println(ans)
  }
}