Formula For Getting Distance