#include using namespace std; #define ff first #define ss second #define _N 100005 #define mk make_pair const long long inf = 1e18; const long long mod = 1e9+7; typedef long long ll; ll power (ll x, ll y, ll z) { ll c = 1ll; while (y > 0) { if (y % 2) c = (c * x) % z; y /= 2; x = (x * x) % z; } return c; } const int RIGHT = (1 << 19); const int N = 300005; int n; int main () { // freopen ("IN.txt", "r", stdin); int p, d, m, s, def = 0; scanf ("%d%d%d%d", &p, &d, &m, &s); while (0 < s) { if (p <= m) p = m; s -= p; if (s >= 0) def ++; p -= d; } printf ("%d", def); return 0; }