caterpillar graph
If we have caterpillar graph like in pic (we know quantity of "side" vertexes in every "main" vertex), how we can count quantity