#include using namespace std; int main(){ int a,b,c,d,ans; cin>>a>>b>>c>>d; ans=min({a,b/c,d/(1+c)}); cout<