input: 
  from typing import List
  
  
  def sum_of_even_numbers(n: int) -> int:
      """ Calculate the sum of all even numbers less than or equal to n.
      >>> sum_of_even_numbers(10)
      30
      >>> sum_of_even_numbers(5)
      6
      """
  
output:     total = 0
      for i in range(2, n + 1, 2):
          total += i
      return total