Energy loss of protons in thin films of carbon, aluminium and silver