#include using namespace std; #define pb push_back #define mp make_pair typedef long long ll; int main(){ int p,d,m,s; cin>>p>>d>>m>>s; int tot=0,cnt=0; while(tot<=s){ tot+=p; p-=d; p=max(p,m); cnt++; } printf("%d\n",cnt-1); return 0; }