#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define Would #define you const int INF = 999999999; const int MOD = 1e9 + 7; const double pi = 3.141592653589793238; int main() { long long a, b, c, d, ans = 0; cin >> a >> b >> c >> d; while (a) { ++ans; if (c <= (ans % 12) + 1 && (ans % 12) + 1 <= c + d - 1) { a -= (2 * b); } else { a -= b; } } cout << ans << endl; }