#include using namespace std; #define int long long #define nl "\n" #define vi vector #define ip(x) \ for (auto &it : x) \ cin >> it #define all(x) x.begin(), x.end() void solve() { int a, b, s; cin >> a >> b >> s; int c = 0; for (int i = 1; i <= min(a, s); i++) { c += b * (a - i + 1); } for (int i = 2; i <= min(b, s); i++) { c += a * (b - i + 1); } cout << c << nl; } signed main() { ios::sync_with_stdio(false); cin.tie(0); int t = 1; // cin >> t; while (t--) solve(); }