Two friends decided to get together, so they start riding bikes towards each other.

They plan to meet halfway.

Each is riding at 6 kmph.

They live 36 kms apart.

One of them has a pet carrier pigeon and it started flying the instant the friends start traveling.

The pigeon flies back and forth at 18 kmph between the two friends until the friends meet.

How far does the pigeon travel?