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