#include<iostream>#include<algorithm>usingnamespacestd;
int main()
{ios::sync_with_stdio(false);#ifndef ONLINE_JUDGEfreopen("rectangle.in", "r", stdin);freopen("rectangle.out", "w", stdout);#endifint n, m, k;cin >> n >> m >> k;if(n < m)swap(n, m);int ans = 0;for(int i = 1; i <= m; i ++){if(i * n < k)continue;int h = k / i;int _ans = i * (i - 1) * h * (h - 1) / 4;int tmp = k - i * h;_ans += tmp * (tmp - 1) * h / 2;ans = max(ans, _ans);}cout << ans;
}