Distance calculation script for learnathon.