Problem Description

Find an index i such that sum of left side equals sum of right side. Print smallest such index, else -1.

Input Format

One line: n then n integers.

Output Format

One integer index.

Sample Test Case

Input:
6 1 3 5 2 2 2
Output:
2

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next