# Does there exist a function $f$ such that $f(x)$ is an integer for only finitely many values of $x$?

Define $$f : \mathbb{R} \to \mathbb{R}$$ such that $$f(x)\leq f(y)$$ whenever $$x\leq y$$ and $$f^{2018} (z) \in \mathbb{Z}$$ $$\forall z \in \mathbb{R}$$. Does there exist a function $$f$$ such that $$f(x)$$ is an integer for only finitely many values of $$x$$?

I think that the condition of the problem forces $$f^n(x) \in \mathbb{Z}$$ for all integer $$n\geq 2018$$. But this doesn't help I guess.

And I'm somewhat sure that the answer is NO.

Side-Note : $$f^n (x)$$ denotes $$n^\text{th}$$ composition of $$f$$