This is a numerical-answer question. The correct answer is shown below.
[Solution by Dr. Abubacker] $f(x)=3+\left[\frac x2\right]-[\sqrt x]$. $\left[\frac x2\right]$ jumps at $x=2,4,6,8$ and $[\sqrt x]$ jumps at $x=1,4$. At $x=4$ both jump by $1$ and cancel, so $f$ is continuous there. $S=\{1,2,6,8\}$ and the sum is $17$. Answer: 17.