$f(x+1)=f(x)$ almost everywhere

Since $f(x+1) = f(x)$ for almost all $x \in \mathbb{R}$ you have that $\mu(A) = 0$ where $\mu$ is the Lebesgue measure and $A = \{x: f(x+1) \neq f(x)\}$.

Notice that for every $n \in \mathbb{Z}$, $n+A$ also has Lebesgue measure $0$ since the Lebesgue measure is translation invariant. In particular, $B = \bigcup_{n \in \mathbb{Z}} (n+A)$ has Lebesgue measure $0$ as a countable union of Lebesgue nullsets. Now define e.g. $F(x) = f(x)$ for $x \not \in B$ and $F(x) = 0$ for $x \in B$ and check that this works.


Define $F(x)=f(x\bmod 1)$ where $x\bmod 1$ is the unique element of $(x+\Bbb Z)\cap [0,1)$. Then $F(x)\ne f(x)$ only if at least one of the numbers $x+n$, $n\in \Bbb Z$ is in $A$. Hence $$\{\,x\in\Bbb R\mid F(x)\ne f(x)\,\}\subseteq \bigcup_{n\in\Bbb Z}(A+n) $$ As $A$ is a nullset, so is the countable union of translated copies of it.