#include int main(){ int A, B, C, D; std::cin>>A>>B>>C>>D; int ans=0; for(int i=1;i<=A;++i){ if(i*C<=B&&i*C+i<=D){ ans=i; } } std::cout<