input: from typing import List
  
  
  def sum_of_even_numbers(n: List[int]) -> int:
      """ Calculate the sum of all even numbers less than or equal to the given number n.
      >>> sum_of_even_numbers([10])
      30
      >>> sum_of_even_numbers([5])
      6
      """
output:     total = 0
      for num in n:
          if num % 2 == 0:
              total += num
      return total