#include using namespace std; #define int long long #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define rrep(i,n) for(int (i)=((n)-1);(i)>=0;(i)--) #define itn int #define all(x) (x).begin(),(x).end() #define F first #define S second const long long INF = 1LL << 60; const int MOD = 1000000007; template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } long long kaijo(long long x){ int p=1; while(x!=0){ p*= x; p%=MOD; x--; } return p; } signed main(void){ int d,l,r,k; cin>>d>>l>>r>>k; int ld=-1, rd=-1; //lとrの深さ vector a(d+200); //深さdにいるノードの数 for(int i=1;i<=20;i++){ a[i-1] = (1LL << (i-1)); if((1LL << (i-1)) <= l && l <= (1LL << (i)) - 1) ld = i; if((1LL << (i-1)) <= r && r <= (1LL << (i)) - 1) rd = i; } if(ld == -1 || rd == -1) {cout<<0<= rd) {cout<<0< k) {cout<<0<