#include #include #include using namespace std; int main(void){ int a,b,c,d,ans; cin>>a>>b>>c>>d; ans=b/c; if(ans<=a && (ans+ans*c)<=d){ cout<