#include #define REP(i,n,N) for(int i=n;i>N>>X>>A>>B; int ans=min((X+A-1)/A,(pow(2,N-1)-X+B-1)/B); p(ans); return 0; }