sum of nodes to k