Works for any number of nodes.
Check that all nodes computed correct result.