Let $n>2$ be an integer. Let $f$ be a real-value function on a plane such that for every regular n-gon with vertices $A_1,A_2,...,A_n$, $f(A_1)+f(A_2)+...+f(A_n)=0$. Prove that $f$ is zero function.
Putnam 2009 asked to prove this for the case of a square which is much easier for me. However I don't have a clue on how to prove the general case.