A cycle with $n$ vertices has $n$ edges.
Number of edges in cycle $=n$
Number of edges in its complement $=\frac{n(n-1)}{2} - n.$
Fo isomorphism, both graphs should have equal number of edges.
$\begin{align}\text{This gives: } \\ &\frac{n(n-1)}{2} - n = n. \\ &\Rightarrow n = 5.\end{align}$