A small bakery makes two types of pastries: croissants and danishes. The bakery sells each croissant for $2 and each danish for $3. On a busy Saturday, they sold a total of 80 pastries, collecting $180 in total sales. If the number of croissants sold is represented by $x$ and the number of danishes sold is represented by $y$, set up a system of equations to find $x$ and $y$.
Use the equations to determine how many croissants were sold. Enter your answer in the grid provided, as a whole number.