Implement Maximum path sum I.