## Fractional part, periodic function

I don't know how to solve this problem:

Let $f$ be a continuous real function such that $\{f(x)\} = f(\{x\})$ for each $x$

$(\{x\}$ is the fractional part of number x)

Prove that then $f$ or $f(x)-x$ is a periodic function.

Could you help me?