Optimal price and advertising policy under atomistic competition