#!/usr/bin/env python3 def main(n): return sum(a*(a-2+a%2) for a in range(3, n+1)) print(main(1000))