Two trains each having a speed of 30 kmph are headed at each other on the same straight track. A bird that can fly at 60 kmph flies off from one train when they are 60 km apart and heads directly for the other train. On reaching the other train, it flies directly back to the first and so forth. How many trips can the bird make from one train to the other before the crash. Also find the total distance that the bird travels.