input: Write a python function to calculate a specific sum by looping through half of the values of n and then doubling the result.
  assert func(10) == 450
  assert func(5) == 75
  assert func(8) == 224
output: def func(n):
      total = 0
      for i in range(n // 2):
          total += i * n
      return total * 2