Pyramide with more then 1 step

I’ve make blueprint more complex as three loops for x -x,y -y,z and keep it in 1 blueprint to proceduraly make it rectanglar or square. Now I need solution to calculate sides from center to each wall.