A school is organizing a field trip and needs to rent buses. Each bus can accommodate 40 students. If there are 120 students attending the trip, how many buses are needed?