\documentclass{article}
\usepackage{tikz}
\newcommand{\n}{3}
\begin{document}
\begin{tikzpicture}
\pgfmathparse{\n-1}
\foreach \i in {0,...,\pgfmathresult}{
\draw (\i,0) circle (0.5);
}
\end{tikzpicture}
\end{document}\end{document}
![alt text][1]
[1]: https://texnique.fr/osqa/upfiles/Screen_Shot_2021-03-19_at_16.57.55.png