equation for number of ads total