#define debug_interval ',' #define dump_interval ' ' #define debug_toggle 1 //{ #pragma GCC optimize ("O3") #pragma GCC target ("avx") #include using namespace std; #define hi cerr<<"hi"<>v;return v;} template inline string toString(T x){ostringstream sout;sout< inline void dump(){cout< inline void dump_rest() {cout< inline void dump_rest(const T& first, const A&... rest){cout< inline void dump(const T&first,const A&...rest){cout< inline void debug(){cerr< inline void debug_rest() {cerr< inline void debug_rest(const T& first, const A&... rest){cerr< inline void debug(const T&first,const A&...rest){if(debug_toggle)cerr<vint; typedef pairpint; typedef vectorvpint; templateinline void chmin(A &a,B b){if(a>b)a=b;} templateinline void chmax(A &a,B b){if(aclass mint{private:int i;public:mint() : i(0){}mint(int i): i((i%m+m)%m){}mint operator+(const mint& o){return o.i+i;}mint operator*(const mint& o){return o.i*i;}mint operator-(){return -i;}operator int() {return i;}}; //} double dp[333]; main(){ int a,b,c,d;cin>>a>>b>>c>>d; dump(min(d/(c+1),a)); }