input: Write a python function to calculate the sum of numbers from 0 to a given number.
  assert sum_of_series(50) == 1275
  assert sum_of_series(100) == 5050
  assert sum_of_series(0) == 0
output: def sum_of_series(n):
      return n * (n + 1) // 2