#include <bits/stdc++.h>

using namespace std;
#define ll long long;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    ll n; cin >> n;
    ll a[n+1];
    ll sall=0;
    for(int i=1; i<=n; i++) {cin >> a[i]; sall+=a[i];}
    sall/=3;
    /*ll p[n+1];
    p[0]=0;
    for(int i=1; i<=n; i++)
    {
        p[i]=p[i-1]+a[i];
    }*/
    deque <ll> q1,q2,q3;
    ll s1=0,s2=0,s3=0;
    int o=1;
    while(s1+a[o]<sall || s1==0)
    {
        s1+=a[o];
        q1.push_back(o);
        o++;
    }
    int k=o-1;
    while(s2+a[o]<s1)
    {
        
    }
}
