func_code_string: #include <bits/stdc++.h>   const int M = 1e9 + 7, N = 2 * 1e5 + 3;   using namespace std;   int main() {     long long a, b, f, k, b0;     cin >> a >> b >> f >> k;     b0 = b;     int ans = 0;     if (b < f || b < a - f) {       cout << -1;       return 0;     }     b0 = b - f;     if (b0 < 0) {       cout << -1;       return 0;     }     bool q = 1;     while (k > 1) {       if (q) {         if (b0 < (a - f) * 2) b0 = b, ans++;         b0 -= (a - f) * 2;         if (b0 < 0) {           cout << -1;           return 0;         }         q = 0;         k--;       } else {         if (b0 < 2 * f) b0 = b, ans++;         b0 -= 2 * f;         if (b0 < 0) {           cout << -1;           return 0;         }         q = 1;         k--;       }     }     if (q && b0 < a - f || !q && b0 < f)       cout << ans + 1;     else       cout << ans;     return 0;   }   