I'm trying to solve an exercise of Lebesgue Integral. It has to do with the following function $f : [0,\infty) \rightarrow \mathbb{R}$
$$ f(x) = \left\{ \begin{array}{ll} 0 & \quad x \in \mathbb{Q} \\ \frac{1}{2^{[x]}} & \quad x \not\in \mathbb{Q} \end{array} \right. $$
where $[x]$ is the integer part of $ x \in \mathbb{R} $. The exercise ask for:
i) Show that $f$ is Lebesgue measurable
ii) Calculate $$\int_{[0,\infty)}f$$
First I tried to graph the function $f$ 
Is that correct? if so I think I can do i) by cases on the paraeter $\alpha \in \mathbb{R} $
But how to do ii) ? Intuitively must be 2... some help to write it down.