The mathematics of multiple lockdowns