object Main extends App {
    var get = readLine.split(" ")
    var R = get(0).toInt
    var G = get(1).toInt
    var B = get(2).toInt
    var N = get(3).toInt
  var sum=0
  for(i <- 0 to N / R){
     for(j <- 0 to N / G){
       for(k <- 0 to N / B) {
         if(i * R + j * G + k * B == N){
           sum = sum + 1
         }
       }
     }
  }
  println(sum)
}