# Continuous function from real to natural number

How can you prove that the only continuous function from real number with the Euclidean topology to natural number with the cofinite topology is the constant function (without metrics)?

I tried to use disconnections and the fact that the preimage of a closed set is close if the function is finite, but I can't find anything, as N is connected with the cofinite topology...

Thank you!

For $f:\mathbb{R} \rightarrow \mathbb{N}$, the set $\{ f^{-1}(x) | x \in \mathbb{N} \}$ partitions $\mathbb{R}$ into a countable nummber of closed sets, which by a theorem of Sierpinski(?) requires the partition to have just one part.