object main {
  def main(args: Array[String]) {
    val R = args(0).toInt
    val G = args(1).toInt
    val B = args(2).toInt
    val N = args(3).toInt

    var count = 0;
    for(r <- 0 to N/R) {
      for(g <- 0 to (N-r*R)/G) {
        if((N-r*R-g*G)%B == 0) {
          count+=1
        }
      }
    }

    printf("%d\n", count)
  }
}