Question 2
Let $n$ be a positive integer. Find the largest nonnegative real number $f(n)$ (depending on $n$) with the following property: whenever $a_{1}, a_{2}, \ldots, a_{n}$ are real numbers such that $a_{1}+a_{2}+\cdots+a_{n}$ is an integer, there exists some $i$ such that $\left|a_{i}-\frac{1}{2}\right| \geq f(n)$.