Let C be the Cantor set and let $f:[0,1]\rightarrow\mathbb R$ be determined by $$f(x) = \begin{cases} 1, \quad \text {if}\ x\in C\\0, \quad \text{if}\ \ x\notin C\end{cases}$$ Find an upper step function $S$ for $f$ such that $$\sum S<\frac 12$$
Any help would be appreciated. I can draw the Cantor set, but I don't even know what to do with this.

Usually, when working with the Cantor set $C$, we make use of "pre-Cantor sets" $C_n$, $n=0,1,2,\dots$. Here $C_0=[0,1]$, $C_1=[0,1/3]\cup [2/3,1]$, and so forth: $C_n$ is what we obtain after $n$ operations of "throw out the middle third of every remaining interval". Note that $C=\bigcap_{n=1}^\infty C_n$.
Since every $C_n$ is a finite union of intervals, its characteristic function $$ f_n(x) = \begin{cases} 1 ,\quad x\in C_n \\ 0,\quad x\notin C_n\end{cases} $$ is a step function. What remains to do: