Q:

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

Let $f:\mathbb{R}\to\mathbb{C}$ be a function such that $f(x+1)=f(x)$ almost everywhere. 
I want to prove that exists a function $F$ such that $F(x+1)=F(x)$ always holds and $F(x)=f(x)$ almost everywhere. 
I think the intuition here is simple: let $x_0$ be a real number, if every $x\in x_0\mathbb{Z}$ satisfies $f(x+1)=f(x)$, then we define $F(x)=f(x)$. If there are a couple exceptions, we fix them and keep going for every $x_0\in \mathbb{R}$. However I am failling to formalize this. 
Let $A=\{x\in\mathbb{R} : f(x+1)\neq f(x)\}$. Since $\mathbb{R}\setminus A$ is dense, for every $x\in\mathbb{R}$ there is a sequence in $\mathbb{R}\setminus A$ that converges to $x$. Then maybe we could define $F(x)$ as
$$\lim_{n\to\infty}f(x_n).$$
I am lost. 

A:

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.