from itertools import accumulate N = int(input()) a = list(map(int,input().split())) ac = list(accumulate(a)) for i in range(N): j,k = i,i num = ac[i] flg = False count = 1 while j < N-1: j += 1 if num == ac[j]-ac[k]: count += 1 k = j if j == N-1: flg = True elif num < ac[j]-ac[k]: break if flg: print(count) exit() print(1)