Minimum Path Cost in a Grid