A school is using two vans A and B to take groups of students on a field trip. If two students move from van A to van B, the two vans would have the same amount of students in each. If two students move from van B to van A, then van B would have half the number of students of van A. Find the total amount of students on the trip.

Answers with working would be appreciated!