Improvement of the detector resolution in X-ray spectrometry by using the maximum entropy method