I want to have on the right side of the page a footer "Page 1 of 3". I took this code from another post, but the page number appears both on the right side "Page 2 of 3" and in the centre "2".
How can I fix it?
\documentclass[11pt,a4paper,hidelinks,fleqn]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath, amssymb}
\usepackage{lastpage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\chead{\textbf{FE5116}}
\rfoot{Page \thepage\ of \pageref{LastPage}}
\renewcommand{\headrulewidth}{0pt}
\title{Dummy empty page, so that I get the first page with number 2}
\date{}
\begin{document}
\maketitle
\newpage
\section*{Question 1 [25 marks]}
this is a question
\newpage
\section*{Question 1 [25 marks]}
this is a question
\bigskip
%dummy use of math, to center the next line
$$
\text{\textbf{END OF PAPER}}
$$
\end{document}

\cfoot{}. Completely unrelated: don't use$$ ... $$for displayed math, see Why is\[ … \]preferable to$$? – Torbjørn T. May 02 '18 at 11:55