Problem 3028 · Easy
Track the running position and count how often the prefix sum returns to the boundary.
Open the interactive visualisation