Nonadditivity effects during the passage of protons through multilayer targets