Answer
$8$
Work Step by Step
The length of the curve is given as: $L=\int_{p}^{q}\sqrt{r^2+(\dfrac{dr}{d\theta})^2}d\theta$
Thus, $L=\int_{0}^{2\pi} \sqrt{(1+\cos \theta)^2+(-sin \theta)^2} d \theta$
Then, we have $L=\sqrt 2 \int_{0}^{2 \pi} \sqrt {1+\cos \theta} d\theta=2 \int_{0}^{2 \pi} |\cos (\theta/2)| d \theta$
Plug $2p=\theta \implies d\theta=2p dp$
Then, we get $L =4 \int_{0}^{\pi} |\cos p| d p$
Thus, $L=4 \int_{0}^{\pi}/2 \cos p d p -4 \int_{\pi/2}^{\pi} \cos p d p=8$