%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%% Szablon LaTeX do rozwiązań zadań z Olimpiady Matematycznej %%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}
\usepackage[utf8]{inputenc}

% Tutaj można zmienić grubość marginesu.
\usepackage[left=2cm, top=2cm, right=2cm, bottom=1cm, includeheadfoot, headheight=50pt, a4paper]{geometry}
\usepackage{polski}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{amsmath}
\usepackage{amssymb}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Możesz dodać pakiety %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\usepackage{nazwa_pakietu}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Uzupełnij swoje dane %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\imieNazwisko}{Imię nazwisko}
\newcommand{\email}{adres@mailowy.pl}
\newcommand{\nrzad}{1}

% Tutaj jest numeracja stron
\pagestyle{fancy}

\fancyhf{}
\lhead{\fontsize{12}{16}\selectfont
\noindent
\imieNazwisko\\
\email \\}
\chead{
\fontsize{14}{16}\selectfont
\textbf{Zadanie \nrzad}}
\cfoot{
Strona $\thepage$ z $\pageref{LastPage}$
}

\renewcommand{\headrulewidth}{0pt}

\begin{document}
\fontsize{12}{16}\selectfont
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% A tu jest tekst rozwiązania %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\noindent
Tu zapisz swoje rozwiązanie...

\end{document}
