Total cross section for photoproduction of hadrons on protons up to 5 GeV