Maria is preparing for a bake sale and plans to make cookies and brownies. Each cookie costs $0.80 to make and each brownie costs $1.20 to make. If Maria has a budget of $40 and wants to make a total of 50 items, how many cookies can she make, given that the total cost does not exceed her budget?