calculates the sum of numbers less than a million and the time taken to calculate