Two friends Soham & Shaan decide to get together

So they start driving cars towards each other. They plan to meet halfway. Each is riding at 6 Km/hr. They live 36 kms apart.

Shaan has a pet "eagle" and it starts flying the instant they start traveling.

The eagle flies back and forth at 18 Km/hr between them until the two meet.

How many kms does the eagle travel ?