Problem Description

Read n numbers, consider all subsets. For each subset take XOR of its elements. Output the sum of XOR over all subsets.

Input Format

First line n. Second line n integers.

Output Format

One integer sum.

Sample Test Case

Input:
3 1 2 3
Output:
12

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next