The last thing you want to be doing with a hangover is maths! But this formula may be just what you need.