#include using namespace std; #define pb push_back #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() #define sz size() #define forn(i,m) for(int i=0;i<(int)(m);i++) #define fornn(i,n,m) for(int i=n;i<(int)(m);i++) #define forb(i,n,m) for(int i=n;i>=(int)(m);i--) #define forit(it,c) for(__typeof(c.begin()) it=c.begin();it!=c.end();++it) #define mem(a,b) memset(a,b,sizeof(a)) #define pb push_back #define eprintf(...) fprintf(stderr, __VA_ARGS__),fflush(stderr) #define pw(x) (1LL<<(x)) #define DBGV(vari) cout << #vari<< " = "<< (vari) < pii; typedef vector vpii; typedef vector vs; typedef vector vi; typedef vector vd; typedef vector > vvi; typedef long long ll; typedef long double ld; typedef vector vll; typedef pair pdd; typedef pair pll; typedef vector vpll; typedef vector vvpll; inline int nextint(){ int x; scanf("%d",&x); return x; } inline ll nextll() { ll x; scanf("%lld",&x); return x; } #define gc getchar template void scanint(T &x) { T c = gc(); while(((c < 48) || (c > 57)) && (c!='-')) c = gc(); bool neg = false; if(c == '-') {neg = true; c = gc();} x = 0; for(;c < 48 || c > 57;c=gc()); for(;c > 47 && c < 58;c=gc()) x = (x*10) + (c - 48); if(neg) x = -x; } // variadics templateT min_ ( T a , T b ) { return a > b ? b : a ; } template < typename T , typename... Ts > T min_( T first , Ts... last ){ return min_(first, min_(last...)); } templateT max_ ( T a , T b ) { return a > b ? b : a ; } template < typename T , typename... Ts > T max_( T first , Ts... last ){ return max_(first, max_(last...)); } // lambda exp auto square = [](int inp) { return inp * inp; } ; template std::ostream& operator<<(std::ostream &os, const std::pair &t) { os<<"("< ostream& operator<< (ostream& out, const vector& v) { out << "["; size_t last = v.size() - 1; for(size_t i = 0; i < v.size(); ++i) { out << v[i]; if (i != last) out << ", "; } out << "]"; return out; } template ostream& operator<< (ostream& out, const set& v) { out << "{"; auto last = v.end(); for(auto i = v.begin(); i != last;) { out << *i; if (++i != last) out << ", "; } out << "}"; return out; } template ostream& operator<< (ostream& out, const map& v) { out << "{"; auto last = v.end(); for(auto i = v.begin(); i != last;) { out << *i; if (++i != last) out << ", "; } out << "}"; return out; } template void doPrint(std::ostream& out, Arg&& arg, Args&&... args) { out<<"<< "; out << std::forward(arg); using expander = int[]; (void)expander{0, (void(out << ", " << std::forward(args)),0)...}; out<<" >>\n"; } ll pwr(ll base, ll p, ll mod){ ll ans = 1; while(p) { if(p&1) ans=(ans*base)%mod; base=(base*base)%mod; p/=2; } return ans; } ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b,a%b); } ll lcm(ll a, ll b) { return a*(b/gcd(a,b)); } const long double PI = (long double)(3.1415926535897932384626433832795); const ll mx_ll = numeric_limits :: max(); const int mx_int = numeric_limits :: max(); const int mod = 1e9+7; const int oo = 0x3f3f3f3f; const ll OO = 0x3f3f3f3f3f3f3f3fll; const double eps = 1e-9; /*************************************************************************/ const int maxn=100123; void solve(){ } /*************************************************************************/ int main(){ int n,p,d,m,s; cin>>p>>d>>m>>s; n=0; while(s>=p){ s-=p; p=max(m,p-d); n++; } cout<