a=n[1]//n[2] b=n[3]//(n[2]+1) print(min[a,b,n[0]])