Solve USACO 1.1: ride