Zahra gave out a survey to some students in her school about their favorite color. Students could choose between purple and red. 187 of those surveyed said their favorite color was purple. 45% of the students surveyed said their favorite color was red. How many students were surveyed in total?