$f$ is $\mu$-integrable $\Leftrightarrow \, \sum_{n\in\mathbb{Z}}2^n\mu(\{x\in X\mid2^n<f(x)\leq 2^{n+1}\})$
Show that $f$ is integrable iff $\sum\limits_{n\in\mathbb{Z}}2^n \mu(\{x\in S:2^n< \left|f(x)\right|\leq2^{n+1}\})<\infty.$