This is not a statistics problem. It is a dynamic optimization problem. You want to maximize your ad revenue, subject to the constraint that you only have X to spend and the placement of each ad costs Y. Moreover, I think you need to revisit the assumption that the ads that are profitable in one month will continue to be profitable subsequent months. Aside from a few outliers, ads lose their effectiveness over time - which means that this is another constraint in your optimization problem. If this is a real-life problem and not just a mental exercise, your best bet is to hire someone to do it. Kaggle, Innocentive, Elance are just some companies that have a database of reputable data scientist freelancers who can do this for you. (I don't represent any of the companies listed, and with some searching I think you can find others as well.)