A company earns a weekly profit of P dollars by selling x items, according to the equation P(x)=-5x^2+40x-300. How many items does the company have to sell each week to maximize the profit?