import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val r = sc.nextInt
  val g = sc.nextInt
  val b  = sc.nextInt
  val n  = sc.nextInt

  val temp =
    (0 to n / r).map{i =>
      (0 to n / g).count{j =>
        val bk = n - i * r - j * g
        bk % b == 0 && bk >= 0
      }
    }.sum

  println(temp)

}