#include<bits/stdc++.h> using namespace std; #define int long long const int maxn = 1e5 + 10; int n ; int a[maxn]; signed main(){ ios::sync_with_stdio(0); cin >> n; int j = 1;//记录当前层 for(int i = 1; i<=n; i++){ int temp; cin >> temp; if(i >= (1<<j)) j++;//利用二进制控制层数 a[j]+=temp; } int maxx = a[1]; int t = 1; for(int i = 2; i <= j; i++){ if(a[i] > maxx) { maxx = a[i]; t = i; } } cout << t << endl; return 0; }