The demand function for a certain commodity is
p(x)=10−0.001x,
where p is measured in dollars and x is the number of units produced and sold. The total cost of producing x items is
C(x)=50+5x
Determine the level of production that maximizes the profit.