The source of the Missouri River - Brower's Spring apparently - is probably close to the point where it's longest. I can't find it exactly on this map, but have got up to 5790km, from a point just by Yellowstone Airport.
The code is at https://github.com/sdl60660/river-runner/, it would be quite possible to base a solver on that.