Two schools can teach 400 students, so in total, they can teach 2 * 400 = <<2*400=800>>800 students.
The other two schools can teach 340 students, which gives 2 * 340 = <<2*340=680>>680 students in total.
So all four schools can teach 800 + 680 = <<800+680=1480>>1480 students at a time.
#### 1480