Polycarp has created his own training plan to prepare for the programming contests. He will train for $n$ days, all days are numbered from $1$ to $n$, beginning from the first.

On the $i$-th day Polycarp will necessarily solve $a_i$ problems. One evening Polycarp plans to celebrate the equator. He will celebrate it on the first evening of such a day that from the beginning of the training and to this day inclusive he will solve half or more of all the problems.

Determine the index of day when Polycarp will celebrate the equator.


-----Input-----

The first line contains a single integer $n$ ($1 \le n \le 200\,000$) — the number of days to prepare for the programming contests.

The second line contains a sequence $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10\,000$), where $a_i$ equals to the number of problems, which Polycarp will solve on the $i$-th day.


-----Output-----

Print the index of the day when Polycarp will celebrate the equator.


-----Examples-----
Input
4
1 3 2 1

Output
2

Input
6
2 2 2 2 2 2

Output
3



-----Note-----

In the first example Polycarp will celebrate the equator on the evening of the second day, because up to this day (inclusive) he will solve $4$ out of $7$ scheduled problems on four days of the training.

In the second example Polycarp will celebrate the equator on the evening of the third day, because up to this day (inclusive) he will solve $6$ out of $12$ scheduled problems on six days of the training.

Difficulty: EASY
Tags: Implementation
Expected Time Complexity: O(N)

Starter code:

Solutions:
from itertools import accumulate
import bisect

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	half = (1 + sum(arr)) // 2
	acc = [*accumulate(arr)]
	print(bisect.bisect_left(acc, half) + 1)
main()


n = int(input())
t = list(map(int, input().split()))
p = sum(t)
import math
a = math.ceil(p / 2)
u = 0
for j in range(n):
	u += t[j]
	if u >= a:
		print(j + 1)
		break


input()
n = [int(x) for x in input().split()]
s = sum(n)
trgt = s // 2 + s % 2
for (i, x) in enumerate(n):
	trgt -= x
	if trgt <= 0:
		print(i + 1)
		break


n = int(input())
a = [int(i) for i in input().split()]
half2 = sum(a)
half1 = 0
l = 0
for i in range(n):
	half1 += a[i]
	half2 -= a[i]
	if half1 >= half2:
		print(i + 1)
		l = 1
		break
if l == 0:
	print(1)


n = int(input())
arr = list(map(int, input().split()))
s = 0
for i in range(n):
	s += arr[i]
h = int((s + 1) / 2)
ans = 0
s = 0
for i in range(n):
	s += arr[i]
	if s >= h:
		ans = i
		break
print(ans + 1)


import sys

def main():
	modular_table = {}
	n = int(sys.stdin.readline())
	number_list = list(map(int, sys.stdin.readline().split()))
	half_total_count = sum(number_list) / 2
	curr_count = 0
	for i in range(n):
		curr_count += number_list[i]
		if curr_count >= half_total_count:
			print(i + 1)
			break
sys.exit(main())


t = int(input())
x = [int(q) for q in input().split()]
w = 0
ans = 0
a = sum(x) / 2
while w < a:
	w += x[ans]
	ans += 1
print(ans)


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import random
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		n = I()
		l = list(In())
		ans = []
		su = 0
		for x in range(n):
			su += l[x]
			ans.append(su)
		half = math.ceil(su / 2)
		pos = find_gt(ans, half)
		print(pos + 1)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(1):
	main()


def get_input():
	n = input()
	aArrayStr = input()
	aArray = aArrayStr.split(' ')
	return (int(n), aArray)
(n, aArray) = get_input()
count = 0
for i in range(n):
	numOfProblemsSolvedToday = int(aArray[i])
	count = count + numOfProblemsSolvedToday
halfWayMark = count / 2
count = 0
position = -1
for i in range(n):
	numOfProblemsSolvedToday = int(aArray[i])
	count = count + numOfProblemsSolvedToday
	if count >= halfWayMark:
		position = i + 1
		break
print(str(position))


n = int(input())
a = list(map(int, input().split()))
summ = sum(a)
tmp = 0
for i in range(n):
	tmp += a[i]
	if tmp * 2 >= summ:
		print(i + 1)
		break


n = int(input())
a = list(map(int, input().split()))
y = sum(a) / 2
ans = 0
for j in range(n):
	ans += a[j]
	if ans >= y:
		break
print(j + 1)


from itertools import accumulate
from bisect import bisect_left
import math
n = int(input())
a = list(map(int, input().split()))
d = list(accumulate(a))
h = math.ceil(sum(a) / 2.0)
i = bisect_left(d, h)
print(i + 1)


import math
n = int(input())
l = list(map(int, input().rstrip().split()))
s = 0
x = math.ceil(sum(l) / 2)
for i in range(n):
	s = s + l[i]
	if s >= x:
		print(i + 1)
		break


n = eval(input())
a = []
su = 0
a = input().split()
a = [int(i) for i in a]
for i in a:
	su += i
su /= 2
s = 0
for i in range(len(a)):
	s += a[i]
	if s >= su:
		print(i + 1)
		break


from math import ceil

def ekvator(n, a):
	s = ceil(sum(a) / 2)
	s1 = 0
	m = 0
	for i in range(n):
		s1 += a[i]
		if s1 >= s:
			m = i
			break
	return m + 1
m = int(input())
lst = [int(j) for j in input().split()]
print(ekvator(m, lst))


n = int(input())
a = list(map(int, input().split()))
s = 0
b = sum(a) // 2 if sum(a) % 2 == 0 else sum(a) // 2 + 1
for i in range(len(a)):
	s = s + a[i]
	if s >= b:
		print(i + 1)
		break


n = int(input())
a = [int(a) for a in input().strip().split()]
sum = int()
s = int()
for i in range(n):
	sum = sum + a[i]
if sum % 2 == 1:
	sum = sum + 1
for i in range(n):
	s = s + a[i]
	if sum // 2 < s or sum // 2 == s:
		print(i + 1)
		break


n = int(input())
arr = list(map(int, input().split()))
halfTotal = sum(arr) / 2
ans = 0
for i in range(n):
	ans += arr[i]
	if ans >= halfTotal:
		print(i + 1)
		break


from sys import stdin
n = int(input())
z = list(map(int, stdin.readline().rstrip().split(' ')))
a = sum(z)
c = 0
r = False
for i in range(n):
	c = c + z[i]
	if c >= a / 2:
		print(i + 1)
		r = True
		break
if not r:
	print(n)


import sys
import math
amount = int(input())
array = [int(s) for s in input().split()]
sum_ = sum(array)
half = math.ceil(sum_ / 2)
counter = 0
for i in range(len(array)):
	counter += array[i]
	if counter >= half:
		print(i + 1)
		sys.exit(0)


n = int(input())
a_tasks = list()
a_sum = 0
second_string = input()
a_tasks = second_string.split(' ')
for i in range(0, n):
	a_tasks[i] = int(a_tasks[i])
	a_sum += a_tasks[i]
buffer_sum = 0
day_id = 1
for i in range(0, n):
	buffer_sum += a_tasks[i]
	if buffer_sum >= a_sum / 2:
		day_id += i
		break
print(day_id)


n = int(input())
ar = list(map(int, input().split()))
s = sum(ar)
(cnt, s2) = (0, 0)
for i in range(n):
	if s2 >= s / 2:
		break
	s2 += ar[i]
	cnt += 1
print(cnt)


n = int(input())
a = list(map(int, input().split()))
sm = sum(a)
tmp = sm % 2
sm //= 2
sm += tmp
ful = 0
for i in range(n):
	ful += a[i]
	if ful >= sm:
		print(i + 1)
		exit()


n = int(input())
a = [int(x) for x in str(input()).strip().split(' ')]
half_sum = sum(a) / 2
solved = 0
for i in range(1, n + 1):
	solved += a[i - 1]
	if solved >= half_sum:
		print(i)
		break


n = int(input())
a = [int(i) for i in input().split()]
s = sum(a)
cur = 0
for i in range(n):
	cur += a[i]
	if cur * 2 >= s:
		print(i + 1)
		exit(0)


numberOfDays = input()
numberOfProblems = [int(x) for x in input().split()]
sumOfnumberOfProblemsArray = sum(numberOfProblems)
if sumOfnumberOfProblemsArray % 2 == 0:
	halfSize = sumOfnumberOfProblemsArray / 2
else:
	halfSize = int(sumOfnumberOfProblemsArray / 2) + 1
helper = 0
for i in range(0, len(numberOfProblems)):
	helper += numberOfProblems[i]
	if helper >= halfSize:
		print(i + 1)
		break


import math
n = int(input())
arr = [int(item) for item in input().split()]
sumi = 0
for j in arr:
	sumi = sumi + j
t = 0
for i in range(n):
	t = t + arr[i]
	if t >= math.ceil(sumi / 2):
		break
print(i + 1)


n = int(input())
a = list(map(int, input().split()))
s = sum(a)
ans = 0
tmp = 0
while tmp < s / 2:
	tmp += a[ans]
	ans += 1
print(ans)


n = int(input())
a = [int(x) for x in input().split()]
total = sum(a)
half = total / 2
tSoFar = 0
for i in range(0, n):
	tSoFar += a[i]
	if tSoFar >= half:
		print(i + 1)
		break


n = int(input())
data = list(map(int, input().split()))
sum_ = sum(data)
ind = 1
h_sum = 0
ans = None
for el in data:
	h_sum += el
	if h_sum * 2 >= sum_ and ans is None:
		ans = ind
	ind += 1
print(ans)


n = int(input())
a = list(map(int, input().split()))
l = sum(a) / 2
ans = 0
for i in range(n):
	ans += a[i]
	if ans >= l:
		print(i + 1)
		break


from math import *
n = int(input())
a = list(map(int, input().strip().split()))
total = 0
day = 0
s = sum(a)
for i in range(n):
	total += a[i]
	day += 1
	if total >= s / 2:
		break
print(day)


n = int(input())
a = list(map(int, input().split()))
s = 0
temp = sum(a)
for i in range(n):
	s += a[i]
	if s >= temp * 0.5:
		print(i + 1)
		break


n = int(input())
l = list(map(int, input().split()))
r = 0
k = sum(l) / 2
for i in range(n):
	r += l[i]
	if r >= k:
		print(i + 1)
		break


n = int(input())
a = list(map(int, input().split()))
s = sum(a)
s2 = s / 2
sp = 0
for (ind, e) in enumerate(a):
	sp += e
	if sp >= s2:
		print(ind + 1)
		break


from typing import Dict, List, Tuple

def input_lst() -> List[int]:
	return [int(x) for x in input().split()]

def print_out(res: List[int]):
	print(' '.join([str(x) for x in res]))

def main():
	x = int(input())
	a = input_lst()
	task_count = sum(a)
	b = task_count // 2
	b += task_count % 2
	sum_cur = 0
	i = 1
	for el in a:
		sum_cur += el
		if sum_cur >= b:
			print(i)
			break
		i += 1
main()


n = int(input())
nums = list(map(int, input().strip().split()))
summ = 0
for item in nums:
	summ += item
res = 0
cur = 0
for i in range(len(nums)):
	cur += nums[i]
	if cur >= summ / 2:
		res = i
		break
print(res + 1)


import math
n = int(input())
a = [int(x) for x in input().split(' ')]
half = sum(a) / 2
tmp = 0
for i in range(n):
	tmp += a[i]
	if tmp >= half:
		print(i + 1)
		break


n = int(input())
l = list(map(int, input().split()))
w = 0
s = sum(l)
if s % 2 == 0:
	c = s // 2
else:
	c = s // 2 + 1
for i in range(n):
	w = w + l[i]
	if w >= c:
		print(i + 1)
		break


R = lambda : map(int, input().split())
(n, a) = (R(), tuple(R()))
s = sum(a)
t = i = 0
while 2 * t < s:
	t += a[i]
	i += 1
print(i)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [tuple(map(int, l.split())) for l in sys.stdin]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	a = LI()
	s = (sum(a) + 1) // 2
	for i in range(n):
		s -= a[i]
		if s <= 0:
			return i + 1
	return -1
print(main())


n = int(input())
A = list(map(int, input().split(' ')))
total = sum(A)
(ans, acum) = (-1, 0)
for i in range(n):
	acum += A[i]
	if acum * 2 >= total:
		ans = i + 1
		break
print(ans)


n = int(input())
a = list(map(int, input().split()))
m = 0
import math
s = sum(a)
for i in range(n):
	m += a[i]
	if m >= s / 2:
		print(i + 1)
		exit(0)


N = int(input())
A = input().split()
for i in range(N):
	A[i] = int(A[i])
eq = 0
Asums = []
vari = 0
for i in range(N):
	Asums.append(A[i] + vari)
	vari += A[i]
for i in range(N):
	if Asums[i] >= Asums[N - 1] * 0.5:
		eq = i + 1
		break
print(eq)


R = lambda : map(int, input().split())
n = R()
a = tuple(R())
s0 = sum(a) / 2
s = 0
for i in range(len(a)):
	s += a[i]
	if s >= s0:
		print(i + 1)
		break


n = int(input())
a = list(map(int, input().split()))
sum1 = sum(a) / 2
sum2 = 0
for i in range(len(a)):
	sum2 += a[i]
	if sum2 >= sum1:
		print(i + 1)
		break


from math import ceil
n = int(input())
a = list(map(int, input().split()))
if n == 1:
	print(1)
	exit(0)
total = sum(a)
s = 0
for i in range(n):
	s += a[i]
	if s >= ceil(total / 2):
		print(i + 1)
		exit(0)


n = int(input())
days = [int(x) for x in input().split()]
s = sum(days) / 2
total = 0
for i in range(len(days)):
	total += days[i]
	if total >= s:
		break
print(i + 1)


import math
n = int(input())
days = list(map(int, input().split()))
halfsum = math.ceil(sum(days) / 2)
partsum = 0
for i in range(len(days)):
	partsum += days[i]
	if partsum >= halfsum:
		break
print(i + 1)


n = int(input())
a = list(map(int, input().split()))
Sum = sum(a)
(ans, j) = (0, 1)
for i in a:
	ans = ans + i
	if ans * 2 >= Sum:
		print(j)
		break
	j += 1


n = int(input())
a = [int(i) for i in input().split()]
al = sum(a)
num = 0
for i in range(n):
	num += a[i]
	if num * 2 >= al:
		print(i + 1)
		break


a = int(input())
b = input().split()
r = len(b)
i = 0
k = 0
j = 0
h = 0
if r == a:
	for i in range(r):
		t = int(b[i])
		k = k + t
	d = k / 2
	for j in range(r):
		f = int(b[j])
		h = h + f
		if h >= d:
			print(j + 1)
			break


n = int(input())
lst = []
for x in input().split():
	lst.append(int(x))
s = (sum(lst) + 1) // 2
array = [0]
for x in range(n):
	p = array[-1] + lst[x]
	array.append(p)
	if p >= s:
		break
print(x + 1)


n = int(input())
a = [int(i) for i in input().split()]
s = sum(a)
ss = 0
for i in range(n):
	ss += a[i]
	if ss * 2 >= s:
		print(i + 1)
		break


n = int(input())
a = [float(i) for i in input().split(' ')]
threshold = sum(a) / 2
temp = 0
for i in range(n):
	temp += a[i]
	if temp >= threshold:
		print(i + 1)
		break


def main():
	n = int(input())
	problems = [int(i) for i in input().split()]
	all_problems = sum(problems)
	now_problems = problems[0]
	i = 0
	while now_problems < (all_problems + 1) // 2:
		i += 1
		now_problems += problems[i]
	print(i + 1)
main()


num_days = int(input())
all_days = input()
days = all_days.split()
sum_tasks = 0
sum_act = 0
day = 0
for i in range(num_days):
	sum_tasks += int(days[i])
while sum_act < (sum_tasks + 1) // 2:
	day += 1
	sum_act += int(days[day - 1])
print(day)


def main():
	n = int(input())
	a = list((int(x) for x in input().split()))
	s = sum(a)
	t = 0
	for i in range(n):
		t += a[i]
		if 2 * t >= s:
			print(i + 1)
			return
main()


from math import ceil
import sys
n = int(sys.stdin.readline().strip())
arr = list(map(int, sys.stdin.readline().strip().split()))
total_half = ceil(sum(arr) / 2)
currSum = 0
for i in range(len(arr)):
	currSum += arr[i]
	if currSum >= total_half:
		ans = i + 1
		break
print(ans)


input()
l = [int(i) for i in input().split()]
d = sum(l)
x = 0
for i in range(len(l)):
	x += l[i]
	if 2 * x >= d:
		print(i + 1)
		exit(0)


from math import *
n = int(input())
arr = list(map(int, input().split()))
sumx = sum(arr)
ans = -1
sumy = 0
for i in range(n):
	sumy += arr[i]
	if sumy >= ceil(sumx / 2):
		ans = i + 1
		break
print(ans)


n = int(input())
a = list(map(int, input().split()))
tot = sum(a)
t = 0
for i in range(n):
	t += a[i]
	if t >= tot / 2:
		print(i + 1)
		break


import sys
n = int(input())
problems = list(map(int, sys.stdin.readline().strip().split(' ')))
half = sum(problems) / 2
sum = 0
for i in range(len(problems)):
	sum += problems[i]
	if sum >= half:
		print(i + 1)
		break


n = int(input())
arr = list(map(int, input().split()))
sum_arr = sum(arr)
curr = 0
for i in range(n):
	curr += arr[i]
	if curr * 2 >= sum_arr:
		print(i + 1)
		break


N = int(input())
a = [int(x) for x in input().split()]
total_problems = sum(a)
running_sum = 0
for (n, ai) in enumerate(a):
	running_sum += ai
	if running_sum >= total_problems / 2:
		print(n + 1)
		break


import os
import sys
import math

def main():
	n = int(input())
	a = input().split()
	for i in range(n):
		a[i] = int(a[i])
	s = sum(a)
	ss = 0
	j = 0
	while ss < math.ceil(s / 2):
		ss += a[j]
		j += 1
	print(j)
main()


n = int(input())
arr = [int(x) for x in input().split()]
all = sum(arr)
cur = 0
ans = -1
for i in range(n):
	cur += arr[i]
	if 2 * cur >= all:
		ans = i
		break
print(ans + 1)


n = int(input())
line = input().split(' ')
a = []
sum1 = 0
for i in range(n):
	a.append(int(line[i]))
	sum1 = sum1 + int(line[i])
sum2 = 0
for i in range(n):
	sum2 = sum2 + a[i]
	if sum2 * 2 >= sum1:
		print(i + 1)
		break


n = int(input())
l = list(map(int, input().split(' ')))
sm = sum(l)
s = 0
for i in range(0, n):
	s += l[i]
	if 2 * s >= sm:
		print(i + 1)
		break


n = int(input())
ar = list(map(int, input().split()))
for i in range(1, n):
	ar[i] += ar[i - 1]
mid = ar[n - 1] / 2
for i in range(n):
	if ar[i] >= mid:
		print(i + 1)
		break


import math
n = int(input())
days = list(map(int, input().split(' ')))
total = sum(days)
s = 0
for i in range(len(days)):
	s += days[i]
	if s >= math.ceil(total / 2):
		print(i + 1)
		break


n = int(input())
a = list(map(int, input().split()))
res = 0
for i in range(n):
	res = res + a[i]
cnt = 0
for i in range(n):
	cnt = cnt + a[i]
	if cnt * 2 >= res:
		print(i + 1)
		break


import sys, math, queue
MOD = 998244353
sys.setrecursionlimit(1000000)
n = int(input())
a = list(map(int, input().split()))
s = sum(a)
p = 0
for i in range(n):
	p += a[i]
	if p >= (s + 1) // 2:
		print(i + 1)
		exit()


n = int(input())
a = [int(i) for i in input().split()]
s = sum(a) / 2 - 1e-10
k = 0
d = 0
while k < s:
	k += a[d]
	d += 1
print(d)


import traceback
import math
from collections import defaultdict
from functools import lru_cache

def main():
	N = int(input())
	nums = list(map(int, input().split()))
	for i in range(1, N):
		nums[i] += nums[i - 1]
	(lo, hi) = (0, N - 1)
	val = math.ceil(nums[-1] / 2)
	while lo < hi:
		mid = (lo + hi) // 2
		if nums[mid] >= val:
			hi = mid
		else:
			lo = mid + 1
	return lo + 1
try:
	ans = main()
	print(ans)
except Exception as e:
	print(e)
	traceback.print_exc()


n = int(input())
r = [int(i) for i in input().split()]
g = 0
for i in range(n):
	g += r[i]
c = 0
for i in range(n):
	c += r[i]
	if c >= g / 2:
		print(i + 1)
		break


n = int(input())
arr = list(map(int, input().split()))
sm = sum(arr)
m = 0
if n == 1:
	print(1)
	exit()
for i in range(n):
	m += arr[i]
	if m >= (sm + 1) // 2:
		print(i + 1)
		exit()


import bisect
import math
x = int(input())
listik = []
summa = 0
for i in input().split():
	summa += int(i)
	listik.append(summa)
summa = math.ceil(summa / 2)
indexik = bisect.bisect(listik, summa)
if x == 1:
	print(1)
elif listik[indexik - 1] < summa:
	print(indexik + 1)
else:
	print(indexik)


n = int(input())
a = list(map(int, input().split()))
flag = sum(a) / 2
temp = 0
for i in range(n):
	temp = temp + a[i]
	if temp >= flag:
		print(i + 1)
		break


n = int(input())
l = list(map(int, input().split()))
(summ, count) = (sum(l), 0)
for (i, j) in enumerate(l):
	if count + j >= summ / 2:
		print(i + 1)
		break
	else:
		count += j


import sys
import math
n = int(input())
a = [int(x) for x in input().split()]
s = 0
z = sum(a)
for i in range(n):
	s += a[i]
	if s >= math.ceil(z / 2):
		print(i + 1)
		sys.exit()


import sys
n = int(input())
a = list(map(int, input().split()))
half = sum(a) + 1 >> 1
acc = 0
for (i, x) in enumerate(a, start=1):
	acc += x
	if half <= acc:
		print(i)
		exit()


n = int(input().strip())
arr = list(map(int, input().split()))
sum_ = sum(arr) / 2
temp = 0
res = 0
for i in range(n):
	temp += arr[i]
	if temp >= sum_:
		res = i + 1
		break
print(res)


n = int(input())
l = list(map(int, input().strip().split()))
cnt = 1
ans = 0
temp = 0
if sum(l) % 2 == 0:
	temp = sum(l) // 2
else:
	temp = sum(l) // 2 + 1
for i in range(n):
	ans += l[i]
	if ans >= temp:
		break
	else:
		cnt += 1
print(cnt)


def main():
	n = int(input())
	a = list(map(int, input().split()))
	sigma = sum(a)
	su = 0
	for i in range(n):
		su += a[i]
		if su * 2 >= sigma:
			print(i + 1)
			break
main()


import sys
import math
import bisect

def solve(A):
	n = len(A)
	total = sum(A)
	val = 0
	for i in range(n):
		val += A[i]
		if val * 2 >= total:
			return i
	return -1

def main():
	n = int(input())
	A = list(map(int, input().split()))
	print(solve(A) + 1)
main()


n = int(input())
l = list(map(int, input().split()))
s = (sum(l) + 1) // 2
x = 0
for i in range(len(l)):
	x += l[i]
	if x >= s:
		print(i + 1)
		return


n = int(input())
a = list(map(int, input().split()))
half = sum(a) / 2
_sum = 0
for i in range(n):
	_sum += a[i]
	if _sum >= half:
		print(i + 1)
		break


from math import ceil
n = int(input())
a = list(map(int, input().split()))
s = sum(a)
s = ceil(s / 2)
i = 0
acc = 0
while i < n and acc < s:
	acc += a[i]
	i += 1
print(i)


import math
(N, l, c) = (int(input()), [int(i) for i in input().split(' ')], 0)
for i in range(1, N):
	l[i] = l[i - 1] + l[i]
for i in range(N):
	if l[i] >= math.ceil(l[N - 1] / 2):
		c = c + 1
		break
	c = c + 1
print(c)


while True:
	n = int(input())
	A = input().split()
	for index in range(0, n):
		A[index] = int(A[index])
	S = sum(A)
	x = 0
	for index in range(0, n):
		x += A[index]
		if x * 2 >= S:
			print(index + 1)
			break
	break


import sys
input = sys.stdin.readline
from math import log2, log, ceil

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	while x != link[x]:
		x = link[x]
	return x

def union(x, y, size, link):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
n = int(input())
a = int_array()
this = sum(a)
now = 0
for i in range(n):
	now += a[i]
	if now >= this / 2:
		print(i + 1)
		break


input()
a = [int(x) for x in input().split()]
s = sum(a)
t = 0
for i in range(len(a)):
	t = t + a[i]
	if t >= s / 2:
		print(i + 1)
		break


n = int(input())
d = list(map(int, input().split()))
(s, c, ok) = (sum(d), 0, 0)
for i in range(n):
	c += d[i]
	if c * 2 >= s:
		print(i + 1)
		break


n = int(input())
k = input().split()
a = list(map(int, k))
summa = sum(a)
tec = 0
day = -1
while tec < summa / 2:
	day += 1
	tec += a[day]
print(day + 1)


x = int(input())
total = 0
flag = False
sp = [int(i) for i in input().split()]
x = sum(sp)
h = 0
for el in sp:
	total += el
	h += 1
	if total >= x / 2:
		print(h)
		flag = True
		break
if not flag:
	print(len(sp))


n = int(input())
l = list(map(int, input().split()))
summ = sum(l)
if summ % 2 == 0:
	key = summ // 2
else:
	key = summ // 2 + 1
p = 0
w = 0
for t in l:
	w += t
	p += 1
	if w >= key:
		break
print(p)


def main():
	input()
	tusks = list(map(int, input().split()))
	tusk_resheno = 0
	equator = sum(tusks) / 2
	for i in range(len(tusks)):
		tusk_resheno += tusks[i]
		if tusk_resheno >= equator:
			print(i + 1)
			break
main()


n = int(input())
a = list(map(int, input().split()))
suma = sum(a)
suma1 = suma
i = 1
while suma - a[i - 1] > suma1 / 2:
	suma -= a[i - 1]
	i += 1
print(i)


n = int(input())
a = list(map(int, input().split()))
s = sum(a)
s1 = 0
i = 0
while s1 * 2 < s:
	s1 += a[i]
	i += 1
print(i)


num_days = input()
user_input = input()
input_list = list(map(int, user_input.split(' ')))
sum1 = sum(input_list)
i = 0
s1 = 0
while i < len(input_list):
	s1 = s1 + input_list[i]
	if s1 >= sum1 / 2:
		print(i + 1)
		break
	i = i + 1


a = []
suml = 0
sm = 0
n = int(input())
x = input().split()
for j in x:
	j = int(j)
	a.append(j)
	suml = suml + j
suml = suml / 2
val = 0
for m in a:
	sm = sm + m
	if sm >= suml:
		val = val + 1
		break
	else:
		val = val + 1
print(val)


import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
r = sum(a)
cur = 0
for i in range(n):
	cur += a[i]
	if cur >= r / 2:
		print(i + 1)
		break


import math as ma
from sys import exit

def li():
	return list(map(int, input().split()))

def num():
	return map(int, input().split())

def nu():
	return int(input())
n = nu()
a = li()
s = sum(a)
x = ma.ceil(s / 2)
v = 0
for i in range(len(a)):
	v = v + a[i]
	if v >= x:
		print(i + 1)
		break


n = int(input())
a = [int(x) for x in input().split()]
x = sum(a)
y = 0
for i in range(n):
	y += a[i]
	if x - y <= y:
		print(i + 1)
		break


n = int(input())
a = list(map(int, input().split()))
ind = 0
s = sum(a)
s = (s + 1) // 2
s1 = 0
for i in range(n):
	if s1 >= s:
		break
	s1 += a[i]
	ind = i
	if s1 >= s:
		break
print(ind + 1)


(n, a) = (int(input()), list(map(int, input().split())))
(s, tem) = (sum(a), 0)
for i in range(n):
	tem += a[i]
	if tem >= s / 2:
		exit(print(i + 1))


n = input()
li = [x for x in map(int, input().split())]
tot = sum(li)
presum = li[0]
for i in range(1, len(li) + 1):
	if presum >= tot / 2:
		print(i)
		break
	presum += li[i]


def inpmap():
	return list(map(int, input().split()))
n = int(input())
arr = list(inpmap())
s = sum(arr)
a = 0
for i in range(n):
	a += arr[i]
	if a >= s / 2:
		print(i + 1)
		break


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
n = Int()
a = array()
solved = 0
need = ceil(sum(a) / 2)
for i in range(n):
	solved += a[i]
	if solved >= need:
		print(i + 1)
		exit()


n = int(input())
list1 = list(map(int, input().split()))
sum_list = sum(list1)
cur = index = 0
for i in range(len(list1)):
	cur += list1[i]
	if cur >= sum_list // 2 and sum_list % 2 == 0:
		index = list1.index(list1[i]) + 1
		break
	elif cur >= sum_list // 2 + 1 and sum_list % 2 != 0:
		index = list1.index(list1[i]) + 1
		break
	list1[i] = 0
print(index)


n = int(input())
a = input().split()
s = 0
s1 = 0
for i in range(n):
	a[i] = int(a[i])
	s += a[i]
for i in range(n):
	s1 += a[i]
	if s1 >= s / 2:
		print(i + 1)
		break


N = int(input())
A = list(map(int, input().split()))
SUM = 0
SUM_A = sum(A)
for i in range(len(A)):
	SUM += A[i]
	if SUM >= SUM_A / 2:
		print(i + 1)
		quit()


n = int(input())
p = [int(x) for x in input().split()]
s = sum(p)
if s % 2 == 0:
	s //= 2
else:
	s = s // 2 + 1
b = 0
for (i, x) in enumerate(p):
	b += x
	if b >= s:
		print(i + 1)
		break


n = int(input())
L = list(map(int, input().split()))
s = sum(L)
x = 0
for i in range(n):
	x += L[i]
	if x >= s / 2:
		print(i + 1)
		break


import math
n = int(input())
a = list(map(int, input().split()))
(sum, half) = (0, 0)
for i in a:
	sum += i
count = 0
for j in a:
	half += j
	count += 1
	if half >= math.ceil(sum / 2):
		break
print(count)


n = int(input())
arr = []
f = 0
g = 0
arr = list(map(int, input().split()))
for i in range(len(arr)):
	f = f + arr[i]
for i in range(len(arr)):
	g = g + arr[i]
	if g >= f / 2:
		print(i + 1)
		break


import atexit
import io
import sys
import math
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())

def main():
	n = int(input())
	a = [int(x) for x in input().split()]
	aa = sum(a)
	cc = 0
	for i in range(n):
		cc += a[i]
		if cc >= math.ceil(aa / 2):
			print(i + 1)
			break
main()


from collections import deque
from math import ceil

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
n = ii()
a = li()
s = 0
for i in a:
	s += i
s = ceil(s / 2)
s1 = 0
for i in range(n):
	s1 += a[i]
	if s1 >= s:
		print(i + 1)
		break


days = int(input())
problems = list(map(int, input().split()))
summa = sum(problems)
if summa % 2 == 0:
	half_sum = summa // 2
else:
	half_sum = summa // 2 + 1
problems_sum = 0
i = 0
while problems_sum < half_sum:
	problems_sum += problems[i]
	i += 1
print(i)


nd = int(input())
days = [int(x) for x in input().split()]
sd = sum(days)
tillnow = 0
tillall = sd
for i in range(nd):
	tillnow += days[i]
	tillall -= days[i]
	if tillnow >= tillall:
		print(i + 1)
		break


import math
n = int(input())
l = list(map(int, input().strip().split()))
s = sum(l)
s1 = 0
for i in range(n):
	s1 = s1 + l[i]
	if s1 >= math.ceil(float(s) / 2):
		print(i + 1)
		break


n = int(input())
s = [int(x) for x in input().split()]
summa = sum(s)
q = 0
for i in range(n):
	q += s[i]
	if q * 2 >= summa:
		print(i + 1)
		exit()


n = int(input())
solvedProblems = list(map(int, input().strip().split(' ')))
jami = sum(solvedProblems)
equator = 0
if jami % 2 == 1:
	equator = int(jami / 2) + 1
else:
	equator = int(jami / 2)
counter = 0
for i in range(0, len(solvedProblems)):
	counter += solvedProblems[i]
	if counter >= equator:
		print(i + 1)
		break


import math
n = int(input())
l = list(map(int, input().split()))
k = math.ceil(sum(l) / 2)
sm = 0
i = 0
while sm < k:
	sm += l[i]
	i += 1
print(i)


n = int(input())
a = [int(i) for i in input().split()]
j = sum(a) / 2
m = 0
for i in range(n):
	m += a[i]
	if m >= j:
		print(i + 1)
		break


days = int(input())
problems = input().split(' ')
general_sum = 0
actual_sum = 0
for i in range(0, days):
	general_sum += int(problems[i])
for i in range(0, days):
	actual_sum += int(problems[i])
	if actual_sum >= general_sum / 2:
		print(i + 1)
		break


import math
n = int(input())
a = [int(i) for i in input().split()]
total = res = index = 0
for i in a:
	total += i
for i in range(n):
	res += a[i]
	if res >= math.ceil(total / 2):
		index = i
		break
print(index + 1)


n = int(input())
a = [int(i) for i in input().split()]
(sum_a, partial_sums) = (sum(a), 0)
for i in range(n):
	partial_sums += a[i]
	if partial_sums >= sum_a / 2:
		print(i + 1)
		break


import math
n = int(input())
a = [int(x) for x in input().split()]
b = sum(a)
c = int(math.ceil(b / 2))
d = 0
i = 0
while d + a[i] < c:
	d += a[i]
	i += 1
print(i + 1)


n = int(input())
a = list(map(int, input().split()))
e = sum(a) / 2
k = 0
i = 0
while k < e:
	k += a[i]
	i += 1
print(i)


import math
n = int(input())
arr = list(map(int, input().split()))
s = math.ceil(sum(arr) / 2)
s1 = 0
for i in range(n):
	s1 += arr[i]
	if s1 >= s:
		print(i + 1)
		break


n = int(input())
a = input()
a = a.split()
sum = 0
for i in a:
	sum += int(i)
halfsum = 0
for i in range(0, n):
	halfsum += int(a[i])
	if halfsum >= sum / 2:
		print(i + 1)
		break


n = int(input())
k = list(map(int, input().split()))
mid = 0
h = 0
for i in range(n):
	h += k[i]
for i in range(n):
	mid += k[i]
	if mid >= h / 2:
		print(i + 1)
		break


(z, zz) = (input, lambda : list(map(int, z().split())))
(szz, dgraphs, mod) = (lambda : sorted(zz()), {}, 10 ** 9 + 7)
from string import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
n = int(z())
l = zz()
s = sum(l)
t = (s + 1) // 2
ans = 0
for (i, j) in enumerate(l):
	ans += j
	if ans >= t:
		print(i + 1)
		break


n = int(input())
a = list(map(int, input().split()))
s = sum(a)
k = s / 2
ss = 0
ans = -1
for i in range(n):
	ss += a[i]
	if ss >= k:
		ans = i + 1
		break
print(ans)


n = int(input())
a = input().split()
a = list(map(lambda x: int(x), a))
s = sum(a)
res = 0
ans = 0
for i in range(len(a)):
	if res >= s / 2:
		ans = i
		break
	res += a[i]
	if res >= s / 2:
		ans = i + 1
		break
if ans == 0:
	ans = 1
print(ans)


n = int(input())
lis = list(map(int, input().split()))
for i in range(1, n):
	lis[i] += lis[i - 1]
for i in range(n):
	if lis[i] * 2 >= lis[-1]:
		print(i + 1)
		break


n = int(input())
a = list(map(int, input().split()))
s = []
tmp = 0
for i in range(n):
	tmp += a[i]
	s.append(tmp)
half = s[n - 1] / 2
for i in range(n):
	if s[i] >= half:
		print(i + 1)
		exit()


n = int(input())
a = list(map(int, input().split()))
s = sum(a) / 2
k = 0
index = 0
while k < s:
	k += a[index]
	index += 1
print(index)


n = int(input())
l = list(map(int, input().split(' ')))
(s, st) = (sum(l), 0)
for i in enumerate(l):
	st += i[1]
	if st >= s // 2 + s % 2:
		print(i[0] + 1)
		break


n = int(input())
list1 = [int(x) for x in input().split()]
maxi = sum(list1)
temp = 0
for i in range(len(list1)):
	temp += list1[i]
	if temp >= maxi / 2:
		print(i + 1)
		break


import math
n = int(input())
l = [int(c) for c in input().split()]
s = math.ceil(sum(l) / 2)
i = -1
while i < n and s > 0:
	i += 1
	s -= l[i]
print(i + 1)


import sys

def equator(n, arr):
	nbrp = sum(arr)
	if nbrp % 2 != 0:
		nbrp = nbrp + 1
	np = 0
	for i in range(len(arr)):
		np = np + arr[i]
		if np >= int(nbrp / 2):
			return i + 1
	return n
n = int(input().strip())
arr = [int(x) for x in input().split()]
print(equator(n, arr))


n = int(input())
s = [int(k) for k in input().split()]
sum = 0
for i in range(n):
	sum += s[i]
t = 0
j = 0
while j < sum / 2:
	j += s[t]
	t += 1
print(t)


n = int(input())
arr = list(map(int, input().split()))
sum = sum(arr)
tar = sum / 2
tar2 = int(tar)
if tar - tar2:
	tar2 += 1
get = 0
i = 1
for x in arr:
	get += x
	if get >= tar2:
		break
	i = i + 1
print(i)


from math import ceil
n = int(input())
s = list(map(int, input().split()))
jog = sum((i for i in s))
nJog = 0
ans = 0
nans = 0
for i in range(0, n):
	nJog += s[i]
	if nJog >= ceil(jog / 2):
		ans = i + 1
		nans = nJog
		break
print(ans)


import math
a = []
n = int(input())
a = input()
sum = 0
result = list(map(int, a.split(' ')))
for i in range(n):
	sum = sum + result[i]
polZad = math.ceil(sum / 2)
for i in range(n):
	polZad = polZad - result[i]
	if polZad <= 0:
		print(i + 1)
		break


import math
n = int(input())
l = [int(x) for x in input().split()]
x = sum(l)
x = math.ceil(x / 2)
s = 0
for i in range(0, len(l)):
	s = s + l[i]
	if s >= x:
		temp = i
		break
print(temp + 1)


n = int(input())
a = list(map(int, input().split()))
t = sum(a) / 2
q = 0
for (k, i) in enumerate(a):
	q += i
	if q >= t:
		print(k + 1)
		break


x = input()
y = input()
m = y.split()
total = 0
sum = 0
index = 0
for i in m:
	total += int(i)
for i in m:
	index += 1
	sum += int(i)
	if sum >= total / 2:
		print(index)
		break


def read_data():
	n = int(input().strip())
	a = list(map(int, list(input().strip().split())))
	return (n, a)

def solve():
	tot = sum(a)
	if tot % 2 == 1:
		tot = tot // 2 + 1
	else:
		tot = tot // 2
	s = 0
	for i in range(n):
		s += a[i]
		if s >= tot:
			return i + 1
(n, a) = read_data()
print(solve())


def inp():
	l = input()
	g = list(map(int, input().split()))
	return (l, g)

def a1(l, A):
	S = sum(A)
	s = 0
	for (j, i) in enumerate(A):
		s += i
		if S / s <= 2:
			print(j + 1)
			break
a1(*inp())


from math import ceil

def b_s(arr, h):
	(l, r) = (0, len(arr))
	while l <= r:
		mid = (l + r) // 2
		if arr[mid] >= h and arr[mid - 1] < h:
			return mid
		if arr[mid] >= h:
			r = mid
		else:
			l = mid
	return mid
n = int(input())
a = [int(i) for i in input().split()]
arr = [0]
for i in range(n):
	arr.append(arr[i] + a[i])
h = ceil(arr[-1] / 2)
print(b_s(arr, h))


n = int(input())
sum = 0
array = [0] * n
_input = input()
nums = _input.split(' ')
for i in range(n):
	array[i] = int(nums[i])
	sum += array[i]
day = 0
newSum = 0
for i in range(n):
	newSum += array[i]
	if sum / newSum <= 2:
		day = i + 1
		break
print(day)


n = int(input())
a = [int(x) for x in input().split()]
s = sum(a)
n = s // 2
ans = 0
index = 1
for i in a:
	ans += i
	if ans > n or (ans == n and s % 2 == 0):
		print(index)
		exit(0)
	index += 1


import sys

class MyReader:

	def __init__(self):
		filename = 'file.in'
		if self.isLocal():
			self.file = open(filename)
		self.str = ['']
		self.ind = 1

	def isLocal(self):
		return len(sys.argv) > 1 and sys.argv[1] == 'SCHULLZ'

	def nextString(self):
		if self.isLocal():
			return self.file.read()
		else:
			return input()

	def nextInt(self):
		return int(self.nextToken())

	def nextToken(self):
		if self.ind >= len(self.str):
			self.ind = 0
			self.str = self.nextString().split()
		self.ind += 1
		return self.str[self.ind - 1]
rdr = MyReader()
n = rdr.nextInt()
a = []
sum = 0
for i in range(0, n):
	a.append(rdr.nextInt())
	sum += a[i]
tmp = 0
for i in range(0, n):
	tmp += a[i]
	if tmp * 2 >= sum:
		print(i + 1)
		break


from math import ceil
n = int(input())
then = input().split()
count1 = 0
count2 = 0
count3 = 0
li1 = list(then)
for i in li1:
	count1 += int(i)
count1 = ceil(count1 / 2)
for i in li1:
	count3 += 1
	count2 += int(i)
	if count2 >= count1:
		break
print(count3)


n = int(input())
data = input()
a = [int(i) for i in data.strip('\n').split(' ')]
s = 0
for i in range(n):
	s += a[i]
s1 = 0
if s % 2 == 0:
	s = s // 2
else:
	s = s // 2 + 1
for i in range(n):
	s1 += a[i]
	if s1 >= s:
		print(i + 1)
		quit()


n = int(input())
a = list(map(int, input().split()))
add = sum(a)
half = add / 2
cnt = 0
sum2 = 0
for i in range(n):
	if sum2 < half:
		sum2 += a[i]
		cnt = cnt + 1
	else:
		break
if cnt == 0:
	print(1)
else:
	print(cnt)


n = int(input())
c = [int(x) for x in input().split(' ')]
j = -1
s1 = 0
s2 = 0
for i in range(n):
	s1 += c[i]
	while s2 < s1 / 2:
		j += 1
		s2 += c[j]
print(j + 1)


from io import BytesIO, IOBase
from math import sqrt
import sys, os
from os import path
inpl = lambda : list(map(int, input().split()))
inpm = lambda : map(int, input().split())
inpi = lambda : int(input())
inp = lambda : input()
(rev, ra, l) = (reversed, range, len)
P = print
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def B(n):
	return bin(n).replace('0b', '')

def factors(n):
	arr = []
	for i in ra(2, int(sqrt(n)) + 1):
		if n % i == 0:
			arr.append(i)
			if i * i != n:
				arr.append(int(n / i))
	return arr

def prime_factors(n):
	omap = {2: 0}
	while n != 1 and n % 2 == 0:
		omap[2] += 1
		n /= 2
	for i in ra(3, int(math.sqrt(n)) + 1, 2):
		while n != 1 and n % i == 0:
			if i not in omap:
				omap[i] = 1
			else:
				omap[i] += 1
			n /= i
	if n != 1:
		omap[int(n)] = 1
	return omap

def dfs(arr, n):
	pairs = [[i + 1] for i in ra(n)]
	vis = [0] * (n + 1)
	for i in ra(l(arr)):
		pairs[arr[i][0] - 1].append(arr[i][1])
	pairs[arr[i][1] - 1].append(arr[i][0])
	comp = []
	for i in ra(n):
		stack = [pairs[i]]
		temp = []
		if vis[stack[-1][0]] == 0:
			while len(stack) > 0:
				if vis[stack[-1][0]] == 0:
					temp.append(stack[-1][0])
					vis[stack[-1][0]] = 1
					s = stack.pop()
					for j in s[1:]:
						if vis[j] == 0:
							stack.append(pairs[j - 1])
				else:
					stack.pop()
			comp.append(temp)
	return comp
from bisect import bisect_left as bl
from bisect import bisect_right as br
import sys, operator, math, operator
from collections import Counter
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
import random
n = inpi()
li = inpl()
su = sum(li)
a = math.ceil(su / 2)
t = 0
for i in ra(n):
	t += li[i]
	if t >= a:
		P(i + 1)
		break


n = int(input())
mas = list(map(int, input().split()))
s = sum(mas)
sc = 0
for i in range(len(mas)):
	sc += mas[i]
	if sc >= s / 2:
		print(i + 1)
		break


from collections import defaultdict, deque
from heapq import heappush, heappop
from math import inf
ri = lambda : map(int, input().split())

def solve():
	n = int(input())
	A = list(ri())
	total = sum(A)
	curr = 0
	for i in range(n):
		curr += A[i]
		if curr >= total / 2:
			print(i + 1)
			return
t = 1
while t:
	t -= 1
	solve()


import math
n = int(input())
A = [int(x) for x in input().split()]
m = math.ceil(sum(A) / 2)
p = 0
for (i, a) in enumerate(A):
	p += a
	if p >= m:
		print(i + 1)
		break


n = int(input())
days = list(map(int, input().split()))
limit = sum(days) / 2
current = 0
for (index, day) in enumerate(days):
	current += day
	if current >= limit:
		print(index + 1)
		break


def get_list(func=None):
	if not func:
		return input().split()
	return list(map(func, input().split()))
n = int(input())
a = get_list(int)
s = sum(a)
s1 = 0
for (i, e) in enumerate(a):
	s1 += e
	if s1 >= s / 2:
		print(i + 1)
		break


n = int(input())
arr = list(map(int, input().split()))
s = 0
ss = sum(arr)
for i in range(n):
	s += arr[i]
	if s >= ss / 2:
		print(i + 1)
		break


n = int(input())
a = list(map(int, input().split()))
(s, k, l) = (0, 0, 0)
for i in a:
	s = s + i
for i in a:
	(k, l) = (k + i, l + 1)
	if k > s / 2 or k == s / 2:
		print(l)
		break


s = input()
li = input().split(' ')
li = list(map(int, li))
target = (sum(li) + 1) // 2
done = False
front_sum = 0
for i in range(1, len(li)):
	front_sum += li[i - 1]
	if front_sum >= target:
		done = True
		print(i)
		break
if not done:
	print(len(li))


from math import ceil
n = int(input())
probs = list(map(int, list(input().split())))
count = 0
half = ceil(sum(probs) / 2)
for i in range(0, n):
	count += probs[i]
	if count >= half:
		print(i + 1)
		exit(0)


n = int(input())
arr = list(map(int, input().split()))
s = sum(arr)
summ = 0
day = 0
for i in arr:
	summ += i
	day += 1
	if summ >= s / 2:
		break
print(day)


n = int(input())
l = [int(i) for i in input().split()]
s = sum(l)
s1 = 0
for i in range(n):
	s1 += l[i]
	if s1 >= s / 2:
		f = 1
		break
print(i + 1)


input()
l = [int(i) for i in input().split()]
k = sum(l)
s = 0
i = 0
while s < k / 2:
	s += l[i]
	i += 1
print(i)


n = int(input())
a = list(map(int, input().split()))
x = (sum(a) + 1) // 2
(day, now) = (1, 0)
for i in a:
	now += i
	if x <= now:
		break
	day += 1
print(day)


n = input()
s = list(map(int, input().split()))
p = sum(s) / 2
for (a, b) in enumerate(s):
	p -= b
	if p <= 0:
		print(a + 1)
		break


n = int(input())
q = [int(x) for x in input().split()]
s = sum(q)
it = 0
for i in range(n):
	x = q[i]
	it += x
	if it * 2 >= s:
		print(i + 1)
		break


Day = int(input())
a = input()
alist = a.split(' ')
alist = [int(alist[i]) for i in range(Day)]
S = sum(alist)
t = 0
for i in range(Day):
	t += alist[i]
	if t >= S / 2:
		break
print(i + 1)


n = int(input())
a = list(map(int, input().split()))
sum1 = sum(a)
sum2 = 0
i = 0
while sum2 < (sum1 + 1) // 2:
	sum2 += a[i]
	i += 1
print(i)


def main():
	input()
	data = list(map(int, input().split()))
	data_r = 0
	equator = sum(data) / 2
	for i in range(len(data)):
		data_r += data[i]
		if data_r >= equator:
			print(i + 1)
			break
main()


def main():
	n = int(input())
	A = [int(x) for x in input().split()]
	print(solver(n, A))

def solver(n, A):
	half = sum(A) / 2
	total = 0
	for i in range(n):
		total += A[i]
		if total >= half:
			return i + 1
main()


def main():
	_ = input()
	a = list(map(int, input().split()))
	cur = 0
	all_probs = sum(a)
	for (i, v) in enumerate(a):
		cur = cur + v
		if 2 * cur >= all_probs:
			print(i + 1)
			return
main()


n = int(input())
a = list(map(int, input().split()))
s = 0
day = 0
sm = sum(a)
half = sm / 2
for i in a:
	s += i
	day += 1
	if s >= half:
		print(day)
		break


n = int(input())
r = [int(y) for y in input().split()]
t = f = m = 0
for z in r:
	m += z
while 2 * f < m:
	f += r.pop(0)
	t += 1
else:
	print(t)


n = int(input())
a = list([int(x) for x in input().split()])
s = sum(a)
check = 0
for i in range(len(a)):
	check += a[i]
	if check >= s / 2:
		print(i + 1)
		break


import sys
import math
sys.setrecursionlimit(100000)
input = sys.stdin.readline

def inp():
	return int(input())

def inara():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
ara = inara()
tot = 0
for num in ara:
	tot += num
now = 0
for i in range(n):
	now += ara[i]
	if now >= (tot + 1) // 2:
		print(i + 1)
		exit(0)


n = int(input())
A = list(map(int, input().split()))
s = sum(A)
ans = 0
cr = 0
for i in range(n):
	cr += A[i]
	if cr >= s / 2:
		ans = i + 1
		break
print(ans)


def midSum(arr):
	total = sum(arr)
	total = (total + 1) // 2
	s = 0
	for i in range(len(arr)):
		s += arr[i]
		if s >= total:
			return i + 1
	return len(arr)

def test():
	print(midSum([1, 3, 2, 1]) == 2)
	print(midSum([2, 2, 2, 2, 2, 2]) == 3)
	print(midSum([1, 3, 4, 1]) == 3)

def ni():
	s = input()
	while len(s) == 0:
		s = input()
	try:
		return int(s)
	except:
		return 0

def nia():
	s = input()
	while len(s) == 0:
		s = input()
	s = s.split()
	iVal = []
	for i in range(len(s)):
		iVal.append(int(s[i]))
	return iVal
n = ni()
print(midSum(nia()))


x = int(input())
y = list(map(int, input().split()))
sum = 0
for i in y:
	sum += i
ind = -1
i = 0
if sum % 2 != 0:
	sumo = sum // 2 + 1
else:
	sumo = sum / 2
while i < sumo:
	ind += 1
	i += y[ind]
print(ind + 1)


n = int(input())
u = list(map(int, input().split()))
s = sum(u)
k = 0
i = 0
while k * 2 < s:
	k += u[i]
	i += 1
print(i)


import math
a = int(input())
b = input().split()
for i in range(len(b)):
	b[i] = int(b[i])
d = int(0)
for j in range(len(b)):
	d += int(b[j])
c = int(math.ceil(d / 2))
t = int(0)
n = int(0)
for k in range(len(b)):
	t += int(b[k])
	n += 1
	if t >= c:
		break
print(int(n))


import math
n = int(input())
arr = list(map(int, input().split()))
ss = sum(arr)
xx = 0
for i in range(n):
	xx += arr[i]
	if xx >= math.ceil(ss / 2):
		print(i + 1)
		exit()


n = int(input())
ai = list(map(int, input().split()))
summ = sum(ai)
summ = summ % 2 + summ // 2
summ2 = 0
ans = 0
for i in range(n):
	summ2 += ai[i]
	if summ2 >= summ:
		ans = i + 1
		break
print(ans)


n = int(input())
a = [int(x) for x in input().split()]
s = 0
for i in range(n):
	s = s + a[i]
h = s / 2
s = 0
i = 0
while i <= n:
	if s < h:
		s = s + a[i]
		i += 1
	else:
		break
print(i)


import math
in_put = int(input(''))
list = []
in_put1 = str(input(''))
in_put1 = in_put1.split(' ')
for items in in_put1:
	list.insert(len(list), float(items))
Sum = 0.0
for items in list:
	Sum = items + Sum
quater = math.ceil(Sum / 2)
counter = 1
sum = 0
for items in list:
	sum = items + sum
	if quater <= sum:
		print(counter, end='')
		break
	else:
		counter = counter + 1


ignore = input()
lis = list(map(int, input().split()))
n = 0
while lis != []:
	a = lis.pop(0)
	while a != 0:
		if lis == []:
			break
		elif lis[-1] > a:
			lis[-1] = lis[-1] - a
			break
		else:
			a = a - lis[-1]
			lis.pop()
	n += 1
print(n)


N = int(input())
L = list(map(int, input().split(' ')))
A = sum(L)
W = A // 2 + A % 2
u = 0
H = 0
for i in range(0, N):
	H = H + L[i]
	if H >= W:
		u = i + 1
		break
print(u)


n = int(input())
seq = list(map(int, input().split()))
T_SUM = sum(seq)
SUM = 0
for i in range(n):
	SUM += seq[i]
	if SUM * 2 >= T_SUM:
		print(i + 1)
		break


input()
a = input().split(' ')
sum = 0
for i in range(len(a)):
	a[i] = int(a[i])
	sum += a[i]
eq_val = sum / 2
tot_probs_solved = 0
i = 0
while eq_val > tot_probs_solved:
	tot_probs_solved += a[i]
	i += 1
print(i)


n = int(input())
arr = list(map(int, input().split()))
half = sum(arr) / 2
summ = 0
for i in range(len(arr)):
	summ += arr[i]
	if summ >= half:
		print(i + 1)
		break


n = int(input())
A = [int(x) for x in input().split(' ')]
s = (sum(A) + 1) // 2
i = 0
sum = 0
while s > sum:
	sum += A[i]
	i += 1
print(i)


def Slove():
	day = 0
	n = int(input())
	a = list(map(int, input().split()))
	sumOfpls = sum(a)
	for i in range(n):
		day += a[i]
		if day >= sumOfpls / 2:
			return i + 1
print(Slove())


N = int(input())
days = list(map(int, input().split()))
total = sum(days)
equator = total // 2 + total % 2
for i in range(len(days) - 1):
	days[i + 1] += days[i]
for i in range(len(days)):
	if days[i] >= equator:
		print(i + 1)
		break


ans = int(input())
list1 = list(map(int, input().split()))
sum2 = sum(list1)
s = sum2 / 2
k = 0
i = 0
while s > k:
	k += list1[i]
	i += 1
print(i)


n = int(input())
a = [int(e) for e in input().split()]
(s, t) = (sum(a), 0)
for (i, j) in enumerate(a):
	t += j
	if t * 2 >= s:
		print(i + 1)
		exit(0)


n = int(input())
arr = list(map(int, input().split()))
pre = []
for i in range(n):
	if i == 0:
		pre.append(arr[i])
		continue
	pre.append(pre[-1] + arr[i])
ans = 0
s = (sum(arr) + 1) // 2
for i in range(n):
	if pre[i] >= s:
		print(i + 1)
		break


n = int(input())
a = list(map(int, input().split()))
s = sum(a) / 2
now_s = 0
j = 0
for i in a:
	j += 1
	now_s += i
	if now_s >= s:
		print(j)
		break


def main():
	_ = int(input())
	arr = list(map(int, input().split()))
	s = sum(arr)
	curr = 0
	for (i, el) in enumerate(arr):
		curr += el
		if 2 * curr >= s:
			print(i + 1)
			return
main()


input()
a = [0]
for x in map(int, input().split()):
	a.append(x + a[-1])
for i in range(len(a)):
	if a[i] * 2 >= a[-1]:
		print(i)
		break


n = int(input())
a = [int(s) for s in input().split()]
b = sum(a)
l = 0
for i in range(len(a)):
	l += a[i]
	if l >= b / 2:
		print(i + 1)
		break


while True:
	try:
		n = int(input())
		a = list(map(int, input().split()))
		sum = sum(a)
		s = 0
		for i in range(n):
			s += a[i]
			if s * 2 >= sum:
				print(i + 1)
				break
	except BaseException:
		break


arr = list()
n = int(input())
sum = 0
val = input()
x = 0
arr = val.split()
for i in arr:
	sum = sum + int(i)
sum = float(sum)
for i in range(0, n):
	x = x + int(arr[i])
	if x >= sum / 2:
		print(i + 1)
		break


n = int(input())
arr = list(map(int, input().split()))
sed = sum(arr)
if sed % 2 == 0:
	sed = sed // 2
else:
	sed = sed // 2 + 1
for i in range(n):
	if sed - arr[i] <= 0:
		print(i + 1)
		break
	else:
		sed -= arr[i]


(n, l) = (int(input()), list(map(int, input().split())))
s = 0
for i in l:
	s += i
(c, i) = (0, 0)
while i < n and c < s / 2:
	c += l[i]
	i += 1
print(i)


import bisect
days = int(input())
problems = list(map(int, input().split(' ')[:days]))
prev = 0
for i in range(len(problems)):
	problems[i] += prev
	prev = problems[i]
x = bisect.bisect_left(problems, problems[len(problems) - 1] // 2)
if 2 * problems[x] - problems[len(problems) - 1] < 0:
	x += 1
print(x + 1)


x = int(input())
(*li,) = map(int, input().split())
sum1 = sum(li)
if li[0] * 2 >= sum1:
	print(1)
	exit()
for i in range(1, x):
	li[i] += li[i - 1]
	if li[i] * 2 >= sum1:
		break
print(i + 1)


def main():
	n = int(input())
	a = [int(x) for x in input().split()]
	s = sum(a)
	day = 0
	count = 0
	while count < s / 2:
		day += 1
		count += a[day - 1]
	print(day)
main()


(n, a) = (int(input()), list(map(int, input().split())))
sum = 0
for i in range(0, n):
	sum += a[i]
sum1 = 0
i = 0
while sum1 < sum:
	sum1 += a[i]
	sum -= a[i]
	i += 1
print(i)


import math
n = int(input().strip())
T = list(map(int, input().strip().split(' ')))
s = math.ceil(sum(T) / 2)
ss = 0
x = 0
while x < len(T):
	ss += T[x]
	if ss < s:
		x += 1
	else:
		break
print(x + 1)


days = int(input())
l = list(map(int, input().split()))
b = sum(l)
sum = 0
flag = 0
for i in range(0, len(l)):
	sum = sum + l[i]
	flag += 1
	if sum >= b / 2:
		print(flag)
		break


n = int(input())
x = list(map(int, input().split()))
total_sum = sum(x)
(cnt, i) = (0, 0)
while 2 * cnt < total_sum:
	cnt += x[i]
	i += 1
print(i)


n = int(input())
a = [int(x) for x in input().split()]
sum = 0
for i in a:
	sum += i
sum1 = 0
for i in range(n):
	sum1 += a[i]
	if sum1 >= sum / 2:
		print(i + 1)
		break


n = int(input())
a = list(map(int, input().split()))
k = 0
p = 0
i = 0
if sum(a) % 2 == 0:
	l = sum(a) // 2
else:
	l = sum(a) // 2 + 1
while k < l and i < len(a):
	k += a[i]
	p += 1
	i += 1
print(p)


n = int(input())
probs = list(map(int, input().split(' ')))[:n]
total = sum(probs)
sumProb = 0
for i in range(n):
	sumProb += probs[i]
	if sumProb >= total / 2:
		print(i + 1)
		break


n = int(input())
s = 0
s1 = 0
w = []
w = list(map(int, input().split()))
for i in range(n):
	s += w[i]
for i in range(n):
	s1 += w[i]
	if s1 * 2 >= s:
		print(i + 1)
		break


n = int(input())
args = input().split(' ')
s = 0
for i in range(len(args)):
	s += int(args[i])
	args[i] = int(args[i])
sred = s / 2
new_s = 0
day = 0
for i in range(0, len(args)):
	new_s += args[i]
	if new_s >= sred:
		day = i
		break
print(day + 1)


n = int(input())
a = list(map(int, input().split()))
s = sum(a)
if s % 2:
	s = (s + 1) // 2
else:
	s //= 2
c = 0
for (i, v) in enumerate(a):
	if c + v >= s:
		print(i + 1)
		break
	else:
		c += v


n = int(input())
i = 0
x = [int(i) for i in input().split()]
Sum = sum(x)
new_sum = 0
while i < n:
	new_sum += x[i]
	if new_sum >= Sum / 2:
		print(i + 1)
		break
	i += 1


import sys

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def solve(n, lst):
	t = (sum(lst) + 1) // 2
	for (i, e) in enumerate(lst):
		t -= e
		if t <= 0:
			return i + 1
	return -1

def main():
	n = I()
	lst = LI()
	print(solve(n, lst))
main()


n = int(input())
s = 0
L = input().split(' ')
for i in range(n):
	L[i] = int(L[i])
	s += L[i]
m = s // 2
m += s % 2
t = 0
j = 0
while t < m:
	t += L[j]
	j += 1
print(j)


(n, a) = (int(input()), list(map(int, input().split())))
total = sum(a)
(cur, pos) = (0, 0)
for elem in a:
	cur += elem
	if 2 * cur >= total:
		print(pos + 1)
		exit()
	pos += 1


i = input()
a = list(map(int, input().split()))
ss = sum(a)
tt = 0
for (index, value) in enumerate(a, 1):
	tt += value
	if tt >= ss / 2:
		print(index)
		break


n = int(input())
ar = list(map(int, input().split()))
sm = sum(ar)
cur = 0
i = 0
for x in ar:
	cur += x
	i += 1
	if cur >= sm / 2:
		print(i)
		break


n = int(input())
arrs = list(map(int, input().split()))
if n == 1:
	print(1)
	exit(0)
half = sum(arrs) / 2
added = 0
i = 0
while added < half:
	added += arrs[i]
	i += 1
print(i)


import sys
n = int(sys.stdin.readline())
nums = list(map(int, sys.stdin.readline().split()))
nsum = sum(nums) / 2
csum = 0
for i in range(n):
	csum += nums[i]
	if csum >= nsum:
		print(i + 1)
		break


n = int(input())
a = [int(i) for i in input().split()]
d = sum(a)
sum = 0
c = 0
for i in range(0, len(a)):
	sum = sum + a[i]
	c = c + 1
	if sum >= d // 2 and d % 2 == 0:
		break
	elif sum >= d // 2 + 1 and d % 2 != 0:
		break
print(c)


import math
n = int(input())
l = list(map(int, input().split()))
k = sum(l)
k = int(math.ceil(k / 2))
(s, c) = (0, 0)
for i in range(len(l)):
	s += l[i]
	c += 1
	if s >= k:
		break
print(c)


import math

def equador(metade):
	soma = 0
	for (indice, numero) in enumerate(lista):
		soma += numero
		if soma >= metade:
			return indice + 1
qtd = input()
lista = [int(i) for i in input().split()]
print(equador(math.ceil(sum(lista) / 2)))


x = int(input())
s = [int(n) for n in input().split()]
j = x // 2
if sum(s[:j + 1]) * 2 > sum(s):
	n = j + 1
	while sum(s[:n]) * 2 >= sum(s):
		n -= 1
	print(n + 1)
elif sum(s[:j + 1]) * 2 == sum(s):
	print(j + 1)
else:
	n = j + 1
	while sum(s[:n]) * 2 < sum(s):
		n += 1
	print(n)


n = int(input())
if 1 <= n <= 200000:
	a = input()
	a = [int(i) for i in a.split()]
	x = sum(a)
	c = 0
	for k in range(len(a)):
		c += int(a[k])
		if c >= x / 2:
			break
		else:
			k += 1
	print(k + 1)


a = [0] * int(input())
sum = 0
a = list(map(int, input().split()))
for i in range(len(a)):
	sum += a[i]
sum = sum / 2
k = 0
q = 0
i = 0
while k < sum:
	k += a[i]
	i += 1
print(i)


x = int(input())
a = list(map(int, input().strip().split(' ')))
count = 0
for i in range(len(a)):
	count = count + a[i]
t = count / 2
m = 0
for i in range(len(a)):
	m = m + a[i]
	if m >= t:
		j = i + 1
		break
print(j)


n = int(input())
m = list(map(int, input().split()))
s = sum(m) / 2
u = 0
r = 0
for i in range(n):
	u += m[i]
	if s <= u:
		r = i
		break
	else:
		continue
print(r + 1)


n = int(input())
a = [int(x) for x in input().split()]
t = sum(a)
s = 0
for (i, c) in enumerate(a):
	s += c
	if 2 * s >= t:
		print(i + 1)
		break


n = input()
a = list(map(int, input().split()))
sm = sum(a)
med = int(sm // 2 + 2 * (sm / 2 - int(sm / 2)))
k = 0
for (j, i) in enumerate(a):
	k += i
	if k >= med:
		print(j + 1)
		raise SystemExit


N = int(input())
arr = list(map(int, input().split()))
S = sum(arr)
cur = 0
idx = 0
for item in arr:
	cur += item
	idx += 1
	if cur >= S / 2:
		print(idx)
		break


n = int(input())
a = list(map(int, input().split()))
s = sum(a)
p = 0
t = 0
for i in a:
	t += 1
	p += i
	if p >= s / 2:
		print(t)
		break


n = int(input())
probs = list(map(int, input().strip().split(' ')))
total = sum(probs)
half = total / 2
csum = 0
for (i, prob) in enumerate(probs):
	csum += prob
	if csum >= half:
		print(i + 1)
		break


import logging
fmt = '%(levelname)s - %(name)s (line:%(lineno)s) - %(message)s'
formatter = logging.Formatter(fmt)
ch = logging.StreamHandler()
ch.setLevel(logging.ERROR)
ch.setFormatter(formatter)
logger = logging.getLogger('equator')
logger.setLevel(logging.ERROR)
logger.addHandler(ch)

def solve(seq):
	total = sum(seq)
	count = 0
	for (i, v) in enumerate(seq):
		count += v
		if count >= total / 2:
			return i + 1
	return len(seq) + 1

def main():
	_ = int(input().strip())
	seq = [int(x) for x in input().strip().split()]
	result = solve(seq)
	print(result)
main()


n = int(input())
a = list(map(int, input().split()))
h = sum(a) / 2
sums = 0
for i in range(n):
	sums += a[i]
	if sums >= h:
		print(i + 1)
		break


inp = input()
a = list(map(int, input().split()))
total = sum(a)
ttl = 0
for (idx, num) in enumerate(a, 1):
	ttl += num
	if ttl >= total / 2:
		print(idx)
		break


k = int(input())
a = [int(i) for i in input().split()]
for i in range(1, k):
	a[i] = a[i - 1] + a[i]
for i in range(k):
	if 2 * a[i] >= a[k - 1]:
		print(i + 1)
		exit()


import math
n = int(input())
arr = [int(x) for x in input().split()]
s = 0
d = 0
for i in range(0, n):
	s = s + arr[i]
for i in range(0, n):
	d = d + arr[i]
	if d >= s / 2:
		print(i + 1)
		break


import sys
from math import *
readints = lambda : map(int, input().strip('\n').split())
n = int(input())
arr = list(readints())
total = sum(arr)
target = (total + 1) // 2
cur = 0
for i in range(n):
	cur += arr[i]
	if cur >= target:
		print(i + 1)
		sys.exit(0)


def main():
	n = int(input())
	a = [int(c) for c in input().split()]
	s = sum(a)
	i = 0
	cur = 0
	while cur < s / 2:
		cur += a[i]
		i += 1
	print(i)
main()


n = int(input())
d = list(map(int, input().split()))
e = sum(d) / 2
sum = 0
for i in range(n):
	sum += d[i]
	if sum >= e:
		print(i + 1)
		break


from math import ceil
(n, c, days) = (int(input()), 0, 0)
a = [int(s) for s in input().split()]
for i in range(0, n):
	c += a[i]
half = int(ceil(c / 2))
c = 0
for i in range(0, n):
	days += 1
	c += a[i]
	if c >= half:
		break
print(days)


n = int(input())
pro = [int(i) for i in input().split()]
p = sum(pro)
cur = 0
for i in range(n):
	cur += pro[i]
	if cur >= p / 2:
		break
print(i + 1)


a = input()
c = input().split()
d = 0
equator = 0
for i in range(0, int(a)):
	equator = equator + int(c[i])
equator /= 2
problems = 0
days = 1
while problems < equator and d <= int(a):
	problems += int(c[d])
	if problems >= equator:
		break
	d += 1
	days += 1
print(days)


t = int(input())
a = [int(i) for i in input().split()]
d = sum(a)
f = d / 2
ff = int(f)
if int(f) != f:
	ff = int(f) + 1
ss = 0
for i in range(len(a)):
	ss += a[i]
	if ss >= ff:
		print(i + 1)
		break


n = int(input())
mas = list(map(int, input().split()))
s = sum(mas)
if s % 2 == 0:
	s = s // 2
else:
	s = s // 2 + 1
now = 0
for i in range(n):
	now += mas[i]
	if now >= s:
		print(i + 1)
		break


n = int(input())
l = list(map(int, input().split()))
x = sum(l) / 2
cur = 0
i = 0
while cur < x:
	cur += l[i]
	i += 1
print(i)


import sys
import os
import math
import re
n = int(input())
l = list(map(int, input().split()))
total = sum(l)
running = 0
for i in range(len(l)):
	running += l[i]
	if running >= total / 2:
		print(i + 1)
		exit(0)


import math
n = int(input())
List = list(map(int, input().split()))
s = math.ceil(sum(List) / 2)
d = 1
k = List[0]
while k < s:
	k += List[d]
	d += 1
print(d)


import sys
data = sys.stdin.readlines()
n = int(data[0])
array = [int(x) for x in data[1].split()]
problems = sum(array)
current_problems = 0
if problems % 2:
	problems = problems + 1
for (idx, probs) in enumerate(array):
	current_problems += probs
	if current_problems >= int(problems / 2):
		print(idx + 1)
		break


n = int(input())
l = list(map(int, input().split()))
s = 0
summ = sum(l)
c = 0
for i in l:
	c += 1
	s += i
	if s >= summ / 2:
		break
print(c)


n = int(input())
sum = 0
li = []
for x in input().split():
	sum += int(x)
	li.append(sum)
for i in range(n):
	if li[i] >= sum / 2:
		print(i + 1)
		break


n = int(input())
a = list(input().split(' '))
a = list((int(x) for x in a))
res = sum(a) / 2
cur = 0
for i in range(n):
	cur += a[i]
	if cur >= res:
		print(i + 1)
		break


a = int(input())
b = list(map(int, input().split()))
c = 0
for i in range(a):
	c += b[i]
d = 0
for i in range(a):
	d += b[i]
	if c % 2 == 0:
		if d >= c // 2:
			print(i + 1)
			break
	elif d > c // 2:
		print(i + 1)
		break


n = int(input())
l = list(map(int, input().split()))
m = sum(l)
s = 0
i = 0
while s < m / 2:
	s += l[i]
	i += 1
print(i)


def find_half_solved(tot_days, problem_list):
	total_problems = sum(problem_list)
	running_total = 0
	curr_idx = 0
	for problem in problem_list:
		running_total += problem
		if running_total >= total_problems / 2:
			print(curr_idx + 1)
			break
		curr_idx += 1
tot_days = input()
problem_list = input()
problem_list = [int(number) for number in problem_list.split(' ')]
find_half_solved(tot_days, problem_list)


f = int(input())
a = list(map(int, input().split()))
s = sum(a) / 2
p = 0
index = 0
while p < s:
	p += a[index]
	index += 1
print(index)


input()
l = list(map(int, input().split()))
(s, t) = (sum(l), 0)
for i in range(len(l)):
	t += l[i]
	if t >= s / 2:
		print(i + 1)
		break


n = int(input())
a = list(map(int, input().split()))
total = sum(a) + 1
total = int(total / 2)
i = 0
sm = 0
while sm < total:
	sm += a[i]
	i += 1
print(i)


x = int(input())
y = list(map(int, input().split()))
summ = sum(y)
current = 0
for i in range(x):
	current = current + y[i]
	if current >= summ / 2:
		print(i + 1)
		break


n = int(input())
x = list(map(int, input().split()))
jem = 0
for i in range(n):
	jem = jem + x[i]
jem2 = 0
ans = 0
for i in range(n):
	jem2 = jem2 + x[i]
	if jem2 >= jem / 2:
		ans = i + 1
		break
print(ans)


n = int(input())
a = list(map(int, input().split()))
eq = sum(a) / 2
sum = 0
for index in range(n):
	sum += a[index]
	if sum >= eq:
		print(index + 1)
		break


n = int(input().strip())
ais = list(map(int, input().strip().split()))
s = sum(ais)
i = 0
s2 = 0
while 2 * s2 < s:
	s2 += ais[i]
	i += 1
print(i)


n = int(input())
arr = input().split()
arr = [int(x) for x in arr]
total = sum(arr) / 2
solved = 0
for x in range(1, len(arr)):
	solved += arr[x - 1]
	if solved >= total:
		print(x)
		exit()
print(n)


a = input()
b = [int(b) for b in input().split()]
c = 0
d = 0
for i in b:
	c += i
for i in range(len(b)):
	d += b[i]
	if d >= c / 2:
		break
print(i + 1)


(n, a) = (int(input()), list(map(int, input().split())))
sm = sum(a)
for i in range(n):
	sm -= a[i] << 1
	if sm <= 0:
		print(i + 1)
		break


import math
n = int(input())
p = input().rstrip().split(' ')
S = 0
for i in range(0, len(p)):
	S += int(p[i])
V = S / 2
D = 0
for i in range(0, len(p)):
	D += int(p[i])
	if D >= V:
		B = i
		break
print(B + 1)


import math
inp = input()
n = int(inp)
l = list()
a = input()
number = a.split()
for num in number:
	l.append(int(num))
avg = sum(l) / 2
tot = int(math.ceil(avg))
largest = 0
for i in range(len(l)):
	largest += l[i]
	if largest >= tot:
		print(i + 1)
		break


suml = 0
sm = 0
n = int(input())
a = list(map(int, input().split()))
for j in a:
	suml = suml + j
suml = suml / 2
day = 0
for m in a:
	sm = sm + m
	if sm >= suml:
		day = day + 1
		break
	else:
		day = day + 1
print(day)


import math
n = int(input())
a = list(map(int, input().strip().split()))
b = math.ceil(sum(a) / 2)
for i in range(n):
	b = b - a[i]
	if b <= 0:
		print(i + 1)
		break


n = int(input())
l = [int(x) for x in input().split()]
ts = sum(l)
sum = 0
for i in range(n):
	sum += l[i]
	if sum >= (ts + 1) // 2:
		print(i + 1)
		exit(0)


def solve():
	n = int(input())
	arr = [int(x) for x in input().split()]
	s = sum(arr)
	res = 0
	for i in range(n):
		res += arr[i]
		if res >= s / 2:
			print(i + 1)
			return
solve()


n = int(input())
l = list(map(int, input().split()))
s = sum(l)
cur = 0
for i in range(n):
	cur += l[i]
	if cur * 2 >= s:
		print(i + 1)
		exit(0)


import math
n = int(input())
input_str = input().split()
tasks = [int(x) for x in input_str]
acc = [tasks[0]] * n
for i in range(1, n):
	acc[i] = acc[i - 1] + tasks[i]
target = math.ceil(acc[-1] / 2)

def search(l, r):
	if l == r:
		if acc[l] >= target:
			return l
		else:
			return l + 1
	c = (l + r) // 2
	if acc[c] < target:
		return search(c + 1, r)
	else:
		return search(l, c)
print(search(0, n - 1) + 1)


k = int(input())
v = input().split(' ')
for i in range(len(v)):
	v[i] = int(v[i])
z = sum(v) // 2 if sum(v) % 2 == 0 else sum(v) // 2 + 1
s = 0
for i in range(len(v)):
	s += v[i]
	if s >= z:
		print(i + 1)
		break


import math
x = int(input())
l = list(map(int, input().split()))
s = 0
f = math.ceil(sum(l) / 2)
for i in range(len(l)):
	s += l[i]
	if s >= f:
		print(i + 1)
		break


n = int(input())
mylist = input()
mylist = list(map(int, mylist.split()))
tsum = sum(mylist)
halfofsum = tsum / 2
csum = mylist[0]
for x in range(len(mylist)):
	if csum >= halfofsum:
		print(x + 1)
		exit()
	csum += mylist[x + 1]


x = int(input())
k = 1
s = list(map(int, input().split()))
if x == 1:
	print('1')
	k = 0
if k == 1:
	z = sum(s)
	l = 0
	for n in range(x):
		l = l + s[n]
		if l >= z / 2:
			print(n + 1)
			break
		else:
			n = n


from sys import stdin
n = int(stdin.readline())
a = [int(x) for x in input().split(' ')]
t = []
p = 0
for i in range(len(a)):
	p += a[i]
	t.append(p)
for i in range(len(t)):
	if t[i] >= t[-1] / 2:
		print(i + 1)
		break


n = input()
a = input().split()
s = 0
s2 = 0
for i in range(len(a)):
	a[i] = int(a[i])
	s += a[i]
for i in range(len(a)):
	s2 += a[i]
	if s2 >= s / 2:
		print(i + 1)
		exit()


read_numbers = lambda : list(map(int, input().split()))
INF = 1 << 64
n = int(input())
a = read_numbers()
(s, t) = (sum(a), 0)
for i in range(1, n + 1):
	t += a[i - 1]
	if t >= s / 2:
		print(i)
		break


n = int(input())
tab = [int(x) for x in input().split()]
s = sum(tab)
c = 0
for i in range(n):
	c += tab[i]
	if (s + 1) // 2 <= c:
		print(i + 1)
		break


n = int(input())
a = [int(x) for x in input().split()]
solved = 0
i = 0
s = sum(a) / 2
while solved < s:
	solved += a[i]
	i += 1
print(str(i))


def editor():
	import sys
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	add = (sum(a) + 1) // 2
	eq = 0
	for (i, num) in enumerate(a):
		eq += num
		if eq >= add:
			print(i + 1)
			return
solve()


n = int(input())
a = list(map(int, input().split()))
k = sum(a)
if k % 2:
	k = k // 2 + 1
else:
	k //= 2
cnt = 0
for i in range(n):
	cnt += a[i]
	if cnt >= k:
		print(i + 1)
		exit(0)


from itertools import accumulate
from bisect import bisect_left
input()
l = list(accumulate(map(int, input().split())))
print(bisect_left(l, (l[-1] + 1) // 2) + 1)


n = int(input())
arr = [int(x) for x in input().split()]
sum = 0
for i in arr:
	sum += i
if sum % 2 == 1:
	sum //= 2
	sum += 1
else:
	sum //= 2
t = 0
for i in range(n):
	t += arr[i]
	if t >= sum:
		print(i + 1)
		break


from collections import defaultdict
from math import *
import os
import sys
from io import BytesIO, IOBase
from heapq import nlargest
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
n = int(input())
arr = list(map(int, input().split()))
s = sum(arr) // 2
if sum(arr) % 2 == 1:
	s += 1
i = 0
while i < n and s > 0:
	s -= arr[i]
	i += 1
print(i)


from sys import *
input = lambda : stdin.readline()
int_arr = lambda : list(map(int, stdin.readline().strip().split()))
str_arr = lambda : list(map(str, stdin.readline().split()))
get_str = lambda : map(str, stdin.readline().strip().split())
get_int = lambda : map(int, stdin.readline().strip().split())
get_float = lambda : map(float, stdin.readline().strip().split())
mod = 1000000007
setrecursionlimit(1000)
n = int(input())
arr = int_arr()
val = sum(arr)
target = val // 2 if val % 2 == 0 else val // 2 + 1
tot = 0
for i in range(n):
	tot += arr[i]
	if tot >= target:
		print(i + 1)
		break


n = int(input())
str_in = input()
Sum = 0
a = 0
num = [int(i) for i in str_in.split()]
for i in num:
	Sum = Sum + int(i)
Sum /= 2
k = 0
for i in num:
	a = a + i
	k += 1
	if a >= Sum:
		print(k)
		break


from math import ceil
n = int(input())
a = list(map(int, input().split()))
s = sum(a)
hf = ceil(s / 2)
s2 = 0
for i in range(n):
	s2 += a[i]
	if s2 >= hf:
		print(i + 1)
		break


n = int(input())
l = [int(i) for i in input().split()]
s = sum(l) / 2.0
sm = 0
for i in range(n):
	sm += l[i]
	if sm >= s:
		print(i + 1)
		exit(0)


n = int(input())
arr = list(map(int, input().split()))
total_problem = sum(arr)
temp = 0
res = 1
for (_, val) in enumerate(arr):
	temp += val
	if total_problem <= temp << 1:
		break
	res += 1
print(res)


N = int(input())
arr = input().split(' ')
total = 0
total1 = 0
for i in range(0, len(arr)):
	total += int(arr[i])
for j in range(0, len(arr)):
	total1 += int(arr[j])
	if total / total1 <= 2.0:
		print(j + 1)
		break


class CodeforcesTask962ASolution:

	def __init__(self):
		self.result = ''
		self.n = 0
		self.tasks = []

	def read_input(self):
		self.n = int(input())
		self.tasks = [int(x) for x in input().split(' ')]

	def process_task(self):
		tasks = sum(self.tasks)
		eq = tasks // 2 + tasks % 2
		s = 0
		for x in range(self.n):
			s += self.tasks[x]
			if s >= eq:
				self.result = str(x + 1)
				break

	def get_result(self):
		return self.result
Solution = CodeforcesTask962ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


n = int(input())
a = list(map(int, input().split()))
s = 0
k = 0
t = 0
for i in range(0, n):
	s = s + a[i]
while t < (s + 1) // 2:
	t = t + a[k]
	k = k + 1
print(k)


n = input()
bar = input().split()
bar = [int(x) for x in bar]
add = sum(bar)
count = 0
allofem = 0
for i in bar:
	count += 1
	allofem += int(i)
	if allofem >= add / 2:
		print(count)
		break


x = input()
x = int(x)
if 0 < x < 200001:
	randVar = 1
else:
	print('No. of days cannot be greater than 200000')
	exit()
ashu = input().split()
while x > 0:
	x = x - 1
	ashu[x] = int(ashu[x])
	if 0 < ashu[x] < 10001:
		randVar1 = 1
	else:
		print('No. of assignment cannot be greater than 10000')
		quit()
a = sum(ashu)
b = a / 2
c = 0
n = 0
while b > c:
	c = c + ashu[n]
	n = n + 1
print(n)


n = int(input())
a = list(map(int, input().split()))
count = 0
summa = sum(a) / 2
for i in range(n):
	count += a[i]
	if count >= summa:
		print(i + 1)
		break


n = int(input())
l = list(map(int, input().split()))
total = 0
for i in l:
	total += i
if total % 2 != 0:
	total = total // 2 + 1
else:
	total = total // 2
count = 0
for i in range(n):
	count += l[i]
	if count >= total:
		break
print(i + 1)


n = int(input())
a = input()
a = a.split()
s = ss = 0
for i in a:
	s += int(i)
s = (s + 1) // 2
j = 0
for i in a:
	ss += int(i)
	j += 1
	if ss >= s:
		break
print(j)


n = int(input())
tasks = list(map(int, input().split()))
s = sum(tasks)
(ans, now) = (0, 0)
while 2 * now < s:
	(ans, now) = (ans + 1, now + tasks[ans])
print(ans)


def main():
	n = int(input())
	ip = [int(item) for item in input().split(' ')]
	prefixSum = []
	prefixSum.append(ip[0])
	for i in range(1, n):
		prefixSum.append(ip[i] + prefixSum[i - 1])
	halfIp = prefixSum[n - 1] / 2
	for i in range(n):
		if prefixSum[i] >= halfIp:
			print(i + 1)
			exit()
main()


n = int(input())
l = list(map(int, input().split()))
s = sum(l)
m = 0
if s % 2 == 0:
	m += s // 2
else:
	m += s // 2 + 1
t = 0
for i in range(n):
	t += l[i]
	if t >= m:
		print(i + 1)
		break


n = int(input())
li = list(map(int, input().split()))
x = sum(li)
cur = 0
for i in range(n):
	cur += li[i]
	if cur >= x / 2:
		print(i + 1)
		break


import math
num = input()
data = [int(s) for s in input().split(' ')]
goal = math.ceil(sum(data) / 2)
sum = 0
for i in range(len(data)):
	sum += data[i]
	if sum >= goal:
		sum = i
		break
print(sum + 1)


t = int(input())
a = list(map(int, input().strip().split(' ')))[:t]
c = 0
for i in range(len(a)):
	c += a[i]
avg = c / 2
c1 = 0
for j in range(len(a)):
	c1 += a[j]
	if c1 >= avg:
		print(j + 1)
		break


n = int(input())
a = input().split(' ')
sum = 0
for i in a:
	sum += int(i)
num = 0
j = 0
for i in a:
	j += 1
	num += int(i)
	if num >= sum / 2:
		break
print(int(j))


import sys
from collections import defaultdict, deque

def input():
	return sys.stdin.readline()[:-1]
input()
arr = [int(x) for x in input().split()]
target = int(sum(arr) / 2 + 0.5)
cur = 0
for (i, e) in enumerate(arr):
	cur += e
	if cur >= target:
		print(i + 1)
		exit()


import sys
import math as mt
import bisect
t = 1

def solve():
	suma = sum(l[:])
	suma1 = 0
	for i in range(n):
		suma1 += l[i]
		if suma1 >= suma / 2:
			return i + 1
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print(solve())


n = int(input())
a = list(map(int, input().split()))
i = 0
s = 0
while i < n:
	s += a[i]
	i = i + 1
i = 0
g = 0
while 2 * g < s:
	g += a[i]
	i = i + 1
print(i)


from math import *
q = int(input())
w = list(map(int, input().split()))
d = sum(w)
i = 0
for j in range(q):
	i += w[j]
	if i >= ceil(d / 2):
		break
print(j + 1)


n = int(input())
a = list(map(int, input().split()))
s = sum(a) // 2 if sum(a) % 2 == 0 else sum(a) // 2 + 1
(i, k) = (0, 0)
while k < s:
	k += a[i]
	i += 1
print(i)


from bisect import bisect_left
from itertools import accumulate
from math import ceil
n = int(input())
a = list(map(int, input().split()))
a_ = list(accumulate(a))
s = ceil(a_[-1] / 2)
ans = bisect_left(a_, s) + 1
print(ans)


a = int(input())
b = list(map(int, input().split()))
c = sum(b) / 2
ans = 0
i = 0
while i < c:
	i += b[ans]
	ans += 1
print(ans)


input()
a = list(map(int, input().split()))
s = sum(a)
b = [0] * 210000
for i in range(len(a)):
	b[i + 1] = b[i] + a[i]
print([i for i in range(210000) if b[i] * 2 >= s][0])


from __future__ import division
n = int(input())
arr = [int(x) for x in input().split()]
s = 0
for i in range(n):
	s = s + arr[i]
x = 0
l = 0
z = 0
x = s / 2
for i in range(n):
	l = l + arr[i]
	if l >= x:
		print(i + 1)
		break


def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = mpos(sum_so_far, current_sum)
	return sum_so_far

def pref(li):
	pref_sum = [0]
	for i in li:
		pref_sum.append(pref_sum[-1] + i)
	return pref_sum

def graph(n, m):
	adj = dict()
	for i in range(1, n + 1):
		adj.setdefault(i, 0)
	for i in range(m):
		(a, b) = map(int, input().split())
		adj[a] += 1
		adj[b] += 1
	return adj
import sys
import threading
from math import *
sys.setrecursionlimit(300000)
threading.stack_size(10 ** 8)
po = int(log(10 ** 18)) + 2
li = []
for i in range(po):
	li.append(3 ** i)
li = li[::-1]
s = sum(li)
for _ in range(1):
	n = int(input())
	a = list(map(int, input().split()))
	s = sum(a)
	cur_s = 0
	for i in range(n):
		cur_s += a[i]
		if cur_s >= ceil(s / 2):
			print(i + 1)
			break


def h(i):
	return (i >> 1) + (i & 1)
input()
a = [int(i) for i in input().split()]
(t, c) = (h(sum(a)), 0)
for (i, ai) in enumerate(a):
	c += ai
	if c >= t:
		print(i + 1)
		break


n = int(input())
A = list(map(int, input().split()))
x = sum(A)
y = 0
for i in range(n):
	y += A[i]
	if y >= x / 2:
		exit(print(i + 1))


n = int(input())
s = input().split()
k = []
ans = 1
p = 0
for i in range(0, n):
	k.append(int(s[i]))
q = sum(k) / 2
for j in range(0, n):
	p += k[j]
	if p >= q:
		break
	ans += 1
print(ans)


from math import ceil
n = int(input())
A = list(map(int, input().split()))
e = ceil(sum(A) / 2)
s = 0
i = 0
while s < e:
	s += A[i]
	i += 1
print(i)


n = int(input())
l = [int(x) for x in input().split()]
target = sum(l) / 2
i = 0
total = 0
while total < target:
	total += l[i]
	i += 1
print(i)


def equator(n, a):
	m = 0
	for i in range(0, n):
		m = m + a[i]
	sum = 0
	import math
	m = math.ceil(m / 2)
	for i in range(0, n):
		sum = sum + a[i]
		if sum == m:
			break
		elif sum >= m:
			break
	if i != n:
		return i + 1
n = int(input())
arr = input()
a = list(map(int, arr.split(' ')))
x = equator(n, a)
print(x)


n = int(input())
days = list(map(int, input().split()))
summ = sum(days)
proreshal = 0
ans = 0
for i in range(len(days) + 1):
	proreshal += days[i]
	if proreshal / summ >= 0.5:
		ans = i + 1
		break
print(ans)


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
n = ii()
l = il()
sm = sum(l)
x = 0
for i in range(n):
	if x + l[i] >= (sm + 1) // 2:
		exit(print(i + 1))
	x += l[i]


n = int(input())
tasks = [int(x) for x in input().split()]
total = sum(tasks)
equator = int(total / 2) + 1 if total % 2 == 1 else total / 2
temp = 0
i = 0
while i < len(tasks):
	temp += tasks[i]
	if temp >= equator:
		break
	i += 1
print(i + 1)


n = int(input())
a = list(map(int, input().split()))
suma = sum(a)
suma = suma / 2
i = 0
j = -1
while not i >= suma:
	j = j + 1
	i = i + a[j]
print(j + 1)


input()
A = list(map(int, input().split()))
(problems, equator) = (0, sum(A) / 2)
for (day, a) in enumerate(A, 1):
	problems += a
	if problems >= equator:
		print(day)
		break


n = int(input())
arr = [float(arr) for arr in input().split()]
equator = sum(arr) / 2
ptr = 0.0
sumx = 0.0
for i in range(n):
	sumx += arr[i]
	ptr += 1
	if sumx >= equator:
		print(int(ptr))
		break


n = input()
n = int(n)
(tmp, ans, ans1) = (0, 0, 0)
a = input().split()
for i in range(0, n):
	tmp += int(a[i])
while ans * 2 < tmp:
	ans += int(a[ans1])
	ans1 += 1
print(ans1)


n = int(input())
List_problems = [int(List_problems) for List_problems in input().split()]
Sum = sum(List_problems)
equator = int(Sum / 2 + Sum % 2)
count = 0
for i in range(len(List_problems)):
	if count < equator:
		count += List_problems[i]
	if count >= equator:
		print(i + 1)
		break


def srch(a, r, l):
	if r == l:
		return r
	m = (r + l) // 2
	if s[m] < a:
		return srch(a, m + 1, l)
	else:
		return srch(a, r, m)
n = int(input())
a = list(map(int, input().split()))
s = [0]
for i in a:
	s += [s[-1] + i]
a = (s[-1] + 1) // 2
print(srch(a, 1, n))


n = int(input())
a = list(map(int, input().split()))
total_sum = 0
for i in a:
	total_sum += i
target = total_sum / 2
days = 0
partial_sum = 0
for i in range(n):
	partial_sum += a[i]
	if partial_sum >= target:
		days = i + 1
		break
print(days)


n = int(input())
mylist = [int(x) for x in input().split()]
m = 0
k = 0
j = 0
for i in mylist:
	m = m + i
for i in mylist:
	k = k + i
	j = j + 1
	if k >= m / 2:
		print(j)
		break


n = int(input())
a = list(map(int, input().split()))
equator = sum(a) / 2
sub = 0
for i in range(n):
	sub += a[i]
	if sub >= equator:
		print(i + 1)
		break


n = int(input().split()[0])
ns = [int(x) for x in input().split()[:n]]
summ = float(sum(ns) / 2.0)
tem = 0
ans = 0
for i in range(1, n + 1):
	tem += ns[i - 1]
	if tem >= summ:
		ans = i
		break
print(ans)


from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b
S1 = 'abcdefghijklmnopqrstuvwxyz'
S2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
n = iinp()
arr = lmp()
sm = sum(arr)
s = 0
for i in range(n):
	s += arr[i]
	if s >= sm / 2:
		break
print(i + 1)


input()
arr = list(map(int, input().split()))
s = sum(arr)
acc = 0
j = 0
for i in range(len(arr)):
	acc += arr[i]
	j += 1
	if acc >= s / 2:
		break
print(j)


n = int(input())
a = input().split()
totalSumm = int(0)
summ = int(0)
stop = int(0)
for i in range(0, n):
	totalSumm = totalSumm + int(a[i])
for i in range(0, n):
	summ = summ + int(a[i])
	if summ >= totalSumm / 2:
		stop = i + 1
		break
print(stop)


n = input()
numbers = str(input()).split(' ')
sum = 0
for i in numbers:
	sum += int(i)
count = 0
for (i, val) in enumerate(numbers):
	count += int(val)
	if count >= sum / 2:
		print(i + 1)
		break


n = int(input())
arr = [int(a) for a in input().strip().split(' ')]
s = sum(arr)
half = s / 2
o = 0
for i in range(1, n + 1):
	o += arr[i - 1]
	if o >= half:
		print(i)
		break


n = int(input())
s = list(map(int, input().split()))
sums = 0
total = 0
for i in s:
	total += i
itere = 0
for i in s:
	itere += 1
	sums += i
	if total % 2 != 0:
		if sums >= total // 2 + 1:
			print(itere)
			break
	elif sums >= total // 2:
		print(itere)
		break


from bisect import bisect_right, bisect_left
n = int(input())
a = list(map(int, input().split()))
for i in range(1, n):
	a[i] += a[i - 1]
res = bisect_left(a, a[-1] / 2) + 1
print(res)


import math
n = int(input())
a = list(map(int, input().split()))
su = sum(a)
su = math.ceil(su / 2)
c = 0
for i in range(len(a)):
	c += a[i]
	if c >= su:
		print(i + 1)
		break


import sys
import string
from heapq import *
from bisect import *
from collections import Counter, defaultdict
from math import fsum, sqrt, gcd, ceil, factorial
from operator import *
from itertools import accumulate
inf = float('inf')
flush = lambda : sys.stdout.flush
comb = lambda x, y: factorial(x) // factorial(y) // factorial(x - y)
en = lambda x: list(enumerate(x))
ip = lambda : input()
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())
n = ii()
arr = rr()
arr = list(accumulate(arr, add))
for i in range(n):
	if arr[i] >= (arr[-1] + 1) // 2:
		print(i + 1)
		exit()


n = int(input())
a = str(input())
List = a.split(' ')
half_sum = 0
for x in List:
	half_sum += int(x)
half_sum = half_sum / 2
Sum = 0
i = 0
for k in List:
	Sum += int(k)
	if Sum >= half_sum:
		print(i + 1)
		break
	i += 1


def main():
	n = int(input())
	a = list(map(int, input().split()))
	s = sum(a)
	(idx, t) = (0, 0)
	while idx < n and 2 * t < s:
		t += a[idx]
		idx += 1
	print(idx)
main()


n = int(input())
tasks = [int(x) for x in input().split()]
sum_tasks = sum(tasks)
sum_ = 0
for i in range(n):
	sum_ += tasks[i]
	if sum_tasks / sum_ <= 2:
		print(i + 1)
		break


a = int(input())
b = list(map(int, input().split()))
s = sum(b)
k = 0
for i in range(a):
	k += b[i]
	if (s + 1) // 2 <= k:
		exit(print(i + 1))


n = int(input())
arr = list(map(int, input().split()))
total = sum(arr) / 2
rolling = 0
for i in range(n):
	rolling += arr[i]
	if rolling >= total:
		print(i + 1)
		break


a = int(input())
n = list(map(int, input().split()))
x = 0
for elem in n:
	x = x + elem
i = 0
y = 0
while i < len(n):
	y = y + n[i]
	if y * 2 >= x:
		break
	i = i + 1
print(i + 1)


(n, s) = (int(input()), [0])
for x in map(int, input().split()):
	s.append(s[-1] + x)
for (i, si) in enumerate(s):
	if si >= s[-1] - si:
		print(i)
		break