In a garden, 20% of the plants are ferns and the remaining are flowers. If the number of ferns is 180 fewer than the number of flowers, how many plants are there in all?