Calculates staircase dimentions