func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long maxn = 4e6;   const long double SADAT = 7.84e-17;   const long long INF = 1e9;   const long long mod = 1e9 + 7;   const long double PI = 4 * atan((long double)1);   long long pw(long long a, long long b) {     return (!b ? 1                : (b & 1 ? a * pw(a * a % mod, b / 2) % mod                         : pw(a * a % mod, b / 2) % mod));   }   long long c, d, n, m, k;   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     cin >> c >> d >> n >> m >> k;     long long w = n * m - k;     long long mn = 1e9;     for (long long i = 0; i < 10005; i++) {       mn = min(mn, c * i + max(w - n * i, (long long)0) * d);     }     cout << mn;     return (0);   }   