A decent strategy for this type of problem is to try to sketch a function. You see that $f$ needs to be symmetric about $x = 1$, and have period $4$. You can get two points where $f''(x) = 0$ by drawing a function which is (for example) concave down on $[0,2.5)$ and $(3.5,6]$, and concave up on $(2.5,3.5)$. You can try to write a formula if you like.
To see that this is minimal, notice that since $f(0) = f(2) = f(4) = f(6)$, the mean value theorem implies that we have three points where $f'(x) = 0$, and another application of the mean value theorem tells us we have two points where $f''(x) = 0$.