Consider the function
\[
f(x) =
\begin{cases}
1, & \text{if } x \in (\mathbb{R} \setminus \mathbb{Q}) \cup \{0\}, \\
1 - \frac{1}{p}, & \text{if } x = \frac{n}{p},\ n \in \mathbb{Z}\setminus\{0\},\ p \in \mathbb{N},\ \gcd(n,p)=1 .
\end{cases}
\]
Then