Solve the formula for the variable Q.