Let $m$ be a fixed positive integer. Consider two sequences of non-negative integers $a_1, a_2, ..., a_m$ and $b_1, b_2, ..., b_m$ which both taken together add up to $n$, that is, $\sum a_i + \sum b_i = n$, where $n$ is fixed positive integer.
Then what is the maximum value that the sum $\sum a_ib_i$ can attain?
Intuitively it seems that the answer should be $ [\frac{n^2}{4}] $. I'm wondering how to prove it rigorously.