//Solution By SlavicG
#include "bits/stdc++.h"
using namespace std;
#define ll long long
#define forn(i,n) for(int i=0;i<n;i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define sz(a) (int)a.size()
#define endl "\n"
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int main()
{
int n;
cin >> n;
int a[n];
for(int i = 0;i < n;i++)
{
cin >> a[i];
}
long long sum = 0;
long long Max = 0;
int DayIndex = -1;
for(int i = 0;i<n;i++)
{
sum += a[i];
if(Max < sum)
{
DayIndex = i;
Max = sum;
}
}
cout << DayIndex+1 <<"\n";
}
Ly9Tb2x1dGlvbiBCeSBTbGF2aWNHCiNpbmNsdWRlICJiaXRzL3N0ZGMrKy5oIgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKI2RlZmluZSBsbCAgICAgICAgICAgICAgICAgICAgICAgICAgbG9uZyBsb25nCgojZGVmaW5lIGZvcm4oaSxuKSAgICAgICAgICAgICAgICAgICBmb3IoaW50IGk9MDtpPG47aSsrKQojZGVmaW5lIGFsbCh2KSAgICAgICAgICAgICAgICAgICAgICB2LmJlZ2luKCksIHYuZW5kKCkKI2RlZmluZSByYWxsKHYpICAgICAgICAgICAgICAgICAgICAgdi5yYmVnaW4oKSx2LnJlbmQoKQoJCiNkZWZpbmUgcGIgICAgICAgICAgICAgICAgICAgICAgICAgIHB1c2hfYmFjawojZGVmaW5lIHN6KGEpICAgICAgICAgICAgICAgICAgICAgICAoaW50KWEuc2l6ZSgpCiAKI2RlZmluZSAgIGVuZGwgICAgICAgICAgICAgICAgICAgICAgICJcbiIKI2RlZmluZSBmYXN0aW8gICAgICAgICAgICAgICAgICAgICAgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7Y2luLnRpZSgwKTtjb3V0LnRpZSgwKTsKCmludCBtYWluKCkKewoJaW50IG47CgljaW4gPj4gbjsKCWludCBhW25dOwoJZm9yKGludCBpID0gMDtpIDwgbjtpKyspCgl7CgkJY2luID4+IGFbaV07Cgl9Cglsb25nIGxvbmcgc3VtID0gMDsKCWxvbmcgbG9uZyBNYXggPSAwOwoJaW50IERheUluZGV4ID0gLTE7Cglmb3IoaW50IGkgPSAwO2k8bjtpKyspCgl7CgkJc3VtICs9IGFbaV07CgkJaWYoTWF4IDwgc3VtKQoJCXsKCQkJRGF5SW5kZXggPSBpOwoJCQlNYXggPSBzdW07CgkJfQoJfQoJY291dCA8PCBEYXlJbmRleCsxIDw8IlxuIjsKfQ==