1
This template calculates the next empty queue, by using the queue next to be loaded (5) and the number of empty queues (4) and then performing some modulo arithmetic.