The Bird and the Two Trains

Two trains are 100 kilometers apart on the same track and start moving towards each other. Train A's speed is 4 km/h, and Train B's speed is 6 km/h. At the same moment, a bird starts from Train A, flying towards Train B at 30 km/h. Upon reaching Train B, it instantly turns back towards Train A. It continues flying back and forth until the trains meet. How far did the bird travel in total?