Energy loss of oxygen and sulphur ions in matter