Calculating exact value of nodes.