We have a building with floors labeled 0 through 4 (n0 to n4). Each floor nX is considered “above” any floor nY where X < Y, meaning n0 < n1 < n2 < n3 < n4 in ascending order.

There are four elevators:
- fast0, a fast elevator currently at floor 0 (n0). It has 0 passengers right now and has a maximum capacity of 2 passengers. It can reach all floors from 0 to 4 (n0 to n4).
- fast1, another fast elevator, currently at floor 3 (n3). It holds 0 passengers at the moment and can also hold up to 2 passengers. It can serve all floors from 0 to 4 (n0 to n4).
- slow0-0, a slow elevator currently at floor 1 (n1). It has 0 passengers and can hold up to 1 passenger. It can reach floors 0, 1, and 2 (n0 to n2).
- slow1-0, another slow elevator, currently at floor 3 (n3). It holds 0 passengers and can hold up to 1 passenger. It can serve floors 2, 3, and 4 (n2 to n4).

We have six passengers on specific floors:
- p0 is on floor 1 (n1).
- p1 is on floor 1 (n1).
- p2 is on floor 4 (n4).
- p3 is on floor 4 (n4).
- p4 is on floor 1 (n1).
- p5 is on floor 3 (n3).

Travel costs are as follows:
- Using a slow elevator costs 6 units per floor for some floors and 7 units for others. For example, going from n0 to n1 costs 6, and from n0 to n2 costs 7.
- Using the fast elevator between any of its reachable floors costs 4 units per floor for some floors and 7 units for others. For example, going from n0 to n1 costs 4, and from n0 to n2 costs 7.

The total cost starts at 0.