I laughed when I read the substraction of 0 legs for each legless elephant. Then I did a double take... 8 legs per elephant is standard?
What's funny is that I would also have subtracted 0, because legless is local slang for 'drunk', so the legless elephants aren't, under that interpretation, missing any legs.