Measure Theory - condition for Integrability A question from my homework:

Let $\,f:X\to [0,\infty)\,$ be a Lebesgue measurable function.
Show that $\,\int_X f\,d\mu < \infty\,\,$ iff $\,\,\sum\limits_{n=1}^\infty \mu\big(\{x\in X:n\leq f(x)\}\big)<\infty.$

I've managed to solve this, but with a relatively complex and convoluted proof. I feel this should be pretty trivial and that I'm probably missing something.
I feel that for $=>$ using Markov's inequality - $ \mu(\{x\in X:n\leq f(x)\})\leq\frac{1}{n}\int_Xf(x)\,d\mu$ should somehow be sufficient.
For <= I feel that defining sets such as $En=\{x\in X:n\leq f(x)\leq n+1\}$ and using the fact that $\int_Xf(x)\,d\mu=\sum\limits_{n=0}^\infty \int_{En} f(x)\,d\mu$ should also somehow be sufficient.
Does this just seem simple to me and actually isn't?
Thanks for the help!
Edit: forgot to add that $\mu(X)<\infty$

Set 
$$
E_n=\{x:f(x)\ge n\}, \,\,\,F_n=\{x\in X: n-1\le f(x)< n\}
$$
Then the $F_n$'s are disjoint and
$$
E_n=\bigcup_{j\ge n+1}F_j\quad\text{and}\quad \mu(E_n)=\sum_{j=n+1}^\infty\mu(F_j), 
$$
and also $\bigcup_{n\in\mathbb N}F_n=X$ and hence $\sum_{n=1}^\infty \mu(F_j)=\mu(X)$. Thus
$$
\sum_{n=0}^\infty \mu(E_n)=\sum_{n=1}^\infty n\,\mu(F_n).
$$
But 
$$
n\,\mu(F_n)\ge\int_{F_n}f\,d\mu \ge (n-1)\,\mu (F_n),
$$
which implies that
$$
\sum_{n=1}^\infty n\,\mu(F_n)\ge\sum_{n=1}^\infty \int_{F_n}f\,d\mu \ge \sum_{n=1}^\infty (n-1)\,\mu (F_n),
$$
or equivalently
$$
\sum_{n=1}^\infty \mu(E_n)\ge\int_{X}f\,d\mu \ge \sum_{n=1}^\infty \mu(E_n)-\sum_{n=1}^\infty \mu (F_n)=\sum_{n=1}^\infty \mu(E_n)-\mu (X),
$$
which proves what has to be proved, if $\mu(X)<\infty$.
