2023 WSMO Team Round Problems/Problem 4

Problem

Honko the hamster is in his cage. He wants to find the smallest distance needed to travel to reach four tennis balls. His current position is $(0,0)$. The tennis balls are located at $(1, 1), (2, -2), (-3, -3),$ and $(-4, 4)$. The length of the shortest path can be expressed as $\sum_{1}^n \sqrt{a_i},$ where $n$ is minimal. Find $\sum_{1}^n a_i.$

Solution