USACO 2019 Gold January Problem Shortcut

USACO 2019 Gold January Problem Shortcut
http://www.usaco.org/index.php?page=viewproblem2&cpid=899
Can anyone help me by explaining the example test case, I have no idea why the output is 40.
Thank you

By adding an edge between field 5 and field 1, we can reduce the travel time by 8 for each of the five cows in that field, resulting in a total time reduction of 8 \cdot 5=40