program main
  implicit none
  integer :: i, j, k, r, g, b, n, cnt = 0

  read *, r, g, b, n 
  do i = 0, int(n/r)
    do j = 0, int(n/g)
      do k = 0, int(n/b)
        if (r*i + g*j + b*k == n) cnt = cnt + 1
      end do
    end do
  end do

  print '(i0)', cnt
end program