A function

is called cool, if for any integer

there exists an integer

such that for every integer

we have

Find the number of cool functions.
Funkcija

je kul, ako za bilo koji cijeli broj

postoji cijeli broj

tako da za savki cijeli broj

imamo

Nađi broj kul funkcija.
[lang=en]
A function $f:\mathbb{Z}\rightarrow \{1,2,\ldots,2026\}$ is called cool, if for any integer $k,1\le k\le 2025$ there exists an integer $j(k)$ such that for every integer $m$ we have
\[f(m+j(k))\equiv f(m+k)-f(m) \pmod{2027}. \]
Find the number of cool functions.
[/lang]
[lang=hr]
Funkcija $f:\mathbb{Z}\rightarrow \{1,2,\ldots,2026\}$ je kul, ako za bilo koji cijeli broj $k,1\le k\le 2025$ postoji cijeli broj $j(k)$ tako da za savki cijeli broj $m$ imamo
\[f(m+j(k))\equiv f(m+k)-f(m) \pmod{2027}. \]
Nađi broj kul funkcija.
[/lang]