Output #1
4
Assume that the bus moves in the negative direction first. Then, the coordinate of the bus changes from $2$ to $1$, and the employees living in Apartment $1$ get off. The movement of the bus after that is obvious: it just continues moving in the positive direction. Thus, if the bus moves in the negative direction first, the coordinate of the bus changes as $2 → 1 → 2 → 3 → 4$ from departure. The time it takes to get home for the employees living in Apartment $1$, $2$, $3$ are $1$, $3$, $4$ seconds, respectively.
Next, assume that the bus moves in the positive direction first. Then, the coordinate of the bus changes from $2$ to $3$, and the employees living in Apartment $2$ get off. Afterwards, the bus starts heading to Apartment $1$, because there are more employees living in Apartment $1$ than in Apartment $3$. Then, after arriving at Apartment $1$, the bus heads to Apartment $3$. Thus, if the bus moves in the positive direction first, the coordinate of the bus changes as $2 → 3 → 2 → 1 → 2 → 3 → 4$ from departure. The time it takes to get home for the employees living in Apartment $1$, $2$, $3$ are $3$, $1$, $6$ seconds, respectively.
Therefore, in the beginning, the employees living in Apartment $1$ or $3$ will try to move the bus in the negative direction. On the other hand, the employees living in Apartment $2$ will try to move the bus in the positive direction in the beginning. There are a total of $3 + 2 = 5$ employees living in Apartment $1$ and $3$ combined, which is more than those living in Apartment $2$, which is $4$. Thus, the bus will move in the negative direction first, and the coordinate of the bus will change as $2 → 1 → 2 → 3 → 4$ from departure.