#include #include using namespace std; int main() { long x, y, d; cin >> x >> y >> d; if (min(x, d) - max(d - y, 0L) >= 0 && min(y, d) - max(d - x, 0L) >= 0) cout << (min(x, d) - max(d - y, 0L)) * ((min(y, d) - max(d - x, 0L))) + 1; else cout << 0; // cout << (max(min(y, d) - max(d - x, 0L), 0L)) * (max(min(x, d) - max(d - y, 0L), 0L)); }