On a busy day in Wormying, on the newly installed bridge,
m worms made their way from Caeno City Side while n worms came crawling from the Rhabditis Rural Area located on
the opposite side of the bridge.
The bridge is wide enough for only 1 worm. Being blind, the worms moving towards each other collided but being
British, both of them apologised and reversed their directions,
thereby colliding with their own group and causing further chaos. How many such apologies were exchanged in
total, before order was restored? Assume that the worms are identical and travel at constant speed.