#include<bits/stdc++.h>
#define mod 1000000007
#define INF 10000000000000001
#define F first
#define S second
#define LB lower_bound
#define UB upper_bound
#define vc vector
#define vll vector<long long>
#define pll pair<long long,long long>
#define pb push_back
#define all(v) v.begin(),v.end()
#define T ll test;cin>>test; while(test--)
#define rep(i,a,n) for(ll i=a;i<(long long)n;++i)
#define repr(i,n,a) for(ll i=n;i>(long long)a;--i)
#define MAX 200005
#define sz(x) (ll)x.size()
#define ins insert
#define mp make_pair
#define int  long long
typedef  long long ll;
typedef long double ld;
using namespace std;

signed main()
{
  ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);
  //T
  {
  	ll n;
  	cin>>n;
  	vector <ll>vec(1<<n),v;
	  	vector<ll> temp;
  	rep(i,0,(1<<n))
  	{
  		cin>>vec[i];
  		v.pb(i);
  		
    }
	  //vector<ll> v;
	  ll le=sz(vec);
	  rep(i,1,n)
	  {
	  	//cout<<i<<endl;
	  	temp.clear();
//	  	for(int j=0;j<sz(v);j++) cout<<vec[v[j]]<<" ";
//	  	cout<<endl;
	  	for(int j=0;j<le;j+=2)
	  	{
	  		if(vec[v[j]]>vec[v[j+1]]) temp.pb(v[j]);
	  		else temp.pb(v[j+1]);
        }
        v=temp;
        le=sz(temp);
	  }
	  if(vec[v[0]]>vec[v[1]]) cout<<v[1]+1<<endl;
	  else cout<<v[0]+1<<endl;
  }
  
}

/*   Har Har Mahadev  */

#include <bits/stdc++.h>
using namespace std; 
typedef long long ll;
typedef long double ld;
typedef vector<ll> vll; 
typedef pair<ll,ll> pll;
typedef priority_queue<ll> pqll;
int INF = 1000000005;
#define lab(i,a,b) for(i=a;i<=b;i++)
#define bal(i,a,b) for(i=b;i>=a;i--)
#define yep cout<<"Yes\n"
#define nope cout<<"No\n"
#define ff first 
#define ss second 
#define mp make_pair 
#define pb push_back
#define pf push_front
#define bp pop_back
#define fp pop_front
#define se(v) v.begin(), v.end()
#define fst ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define tc int t;cin>>t;while(t--) 
#define fceil(a,b) ceil((ld)a/(ld)b)
#define dis(v) for(auto it:v)cout<<it<<" "
bool isPrime(ll n){if(n <= 1)return false;if(n <= 3)return true;if(n%2==0||n%3==0)return false;for(ll i=5;i*i<= n;i=i+6)if(n%i==0||n%(i+2)==0)return false;return true;}
bool cmp(pll &a, pll &b){ if(a.ss == b.ss)return a.ff < b.ff;return a.ss < b.ss;}
int main() 
{ 
    fst
    
      double v,t,s,d;
      cin>>v>>t>>s>>d;
      d=d/v;
      if(d>=t && d<=s)nope;
      else yep;
    
    return 0; 
} 