A deluxe bakery sells a cookie for $2.38, a brownie for $3.07 and a cake for $14.87. On Wednesday they sold 13 cookies, 4 brownies and 4 cakes. The cost in ingredients for each cookie is $1.7, for each brownie is $1.91 and for each cake is $5.83. How much profit did they make on Wednesday?