object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val R, G, B, N = sc.nextInt()
  val matched = for {
    r <- 0.to(N)
    g <- 0.to(N)
    i = N - r * R - g * G
    if i % B == 0 && 0 <= i / B
  } yield  ()
  println(matched.length)
}
