input: Write a python function to calculate the sum of all even numbers up to a given number.
  assert sum_of_even_numbers(10) == 30
  assert sum_of_even_numbers(1) == 0
  assert sum_of_even_numbers(20) == 110
output: def sum_of_even_numbers(n):
      return sum(i for i in range(2, n + 1, 2))