problem 18: Maximum path sum I