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 cnt = 0
    for (nr <- 0 to n) {
      for (ng <- 0 to n) {
        val x = r * nr + g * ng
        val nb = (n - x) / b
        val remain = (n - x) % b
        if(nb >= 0 && remain == 0){
          cnt +=1
        }
      }
    }
    println(cnt)
  }
}