sum the leaves and root to leaf path