Delete the subtrees with a given sum