Rohit decided to walk to the local waterfall, 10 kms away.
At the moment he started, his dog ran off from his side and proceeded to the waterfall at a constant 8 kms per hour.
as soon as the dog reached the waterfall, it started the return journey to Rohit, keeping to the same speed.
The dog continued this odd until Rohit reaches the waterfall.
If Rohit kept to a constant speed 4 kms per hour, how far did the dog run in total?