(4) The correct answer is $(B)$.

As can be easily seen, after a number $k \leq 2017$ of minutes, the first room contains $2017-k$ people, while the $k$ people who have left are arranged in pairs in each of the $\lfloor k / 2\rfloor$ subsequent rooms, plus possibly one in the immediately following room if $k$ is odd. After 1001 minutes, the first room will contain 1016 people, the next 500 rooms will contain two people each, and the 502nd room will contain one person. The remaining 2017 - $502=1515$ rooms will then be empty.

Problem proposed by Matteo Rossi.
4. There are 2017 rooms arranged in a row. The first room contains 2017 people, and all the others are initially empty. Every minute, if a room contains more than one person, one person at random who is in that room moves to the next room. After 1001 minutes, how many rooms are empty?
(A) 1017
(B) 1515
(C) 1016
(D) 1517
(E) 1015