program ABC092B
	integer(8)::N,D,X,i,result,day
	integer(8),allocatable,dimension(:)::A
	read(5,*)N
	read(5,*)D,X
	allocate(A(N))
	read(5,*)(A(i),i=1,N)
	result=X
	
	do i=1,N
		day=1
		result=result+1
		do
			day=day+A(i)
			if(day>D)then
				exit
			end if
			result=result+1
		end do
	end do
	
	print'(i0)',result
end program ABC092B
