There are 5+8+7=<<5+8+7=20>>20 students in the first three groups.
There are 24-20=<<24-20=4>>4 students in the fourth group.
#### 4