The complexity of stair building