#include using namespace std; int main() { int p; int d; int m; int s; cin >> p >> d >> m >> s; long long int answer=0; while(s>=p) { s=s-p; answer++; if(p>=m+d) p=p-d; else p=m; } cout << answer << endl; return 0; }