Solve USACO 1.1: gift1