Unfolding of differential energy spectra in the MAGIC experiment