N = int(input()) A = [int(a) for a in input().split()] if len(A) < 4: print(0) else: count = 0 for i in range(3,len(A)): if sum(A[count:i-1]) == A[i]: print(i, end=' ') count += 1 print()