And we have an f cost which consists of g plus h, which is equal to-- for g, we look up the g cost in the previous node, which is 0, and add the cost of making this last transition from S to A, which is 1. 