Calculate the heart rate: