Hello,
First of all MailChimp has the WordPress plugin and as we know there is no need to add any script if you use the plugin.
Anyway, if you need to add any script to header or footer we would recommend you to install and use Insert Header and Footer plugin with appropriate fields to add the code and don’t overwrite theme files for these purposes.
Regards