The origin of the X-ray background, in particular at hard (2-10 keV) energies, is an issue that has been debated for more than 40 years. The Chandra Deep Fields provide the deepest look at the X-ray sky and are the best data set to study the X-ray background. We searched the Chandra Deep Field-South for X-ray sources with the aid of a dedicated wavelet-based algorithm. We are able to reconstruct the log N-log S source distribution in the soft (0.5-2 keV) and hard (2-10 keV) bands down to limiting fluxes of 2x10(-17) and 2x10(-16) ergs s(-1) cm(-2), respectively. These are a factor of similar to5 deeper than previous investigations. We find that the soft relation continues along the extrapolation from higher fluxes, almost completely accounting for the soft X-ray background. On the contrary, the hard distribution shows a flattening below similar to 2x10(-14) ergs s(-1) cm(-2). Nevertheless, we can account for greater than or similar to 68% of the hard X-ray background, with the main uncertainty being the sky flux itself.