solve l = PI * n * w * (c + d * (n - 1)) / d for n