In front of Louis there are 10 boxes containing different foods: tomatoes, (red) herrings, and bananas.
The boxes are arranged side by side in a line. Right next to the last box are three bigger containers extending this line. His job is to put these boxes into the containers, sorted by food. At his disposal: a crane which can only move horizontally and can pick up and put down one box at a time.
Louis wants to move the boxes a little as possible. Before doing anything, he makes a simplified drawing of his situation, to figure out the best way to move them on paper.
Using the simplified picture, what is the smallest overall travel distance covered by all boxes that he can achieve?