A radio operator has n distinct candidate channel frequencies. To avoid interference, a chosen set of channels is only usable if all of its pairwise spacings (absolute differences between two chosen frequencies) are pairwise distinct from one another — no two different pairs of chosen channels may have the same spacing.
Count how many subsets (of any size, including the empty subset and single-channel subsets, both of which trivially have no repeated spacing) of the given n frequencies are usable under this rule.
Input format
Line 1: an integer n.
Line 2: n distinct positive integers — the candidate frequencies.
Output format
A single integer: the number of usable subsets.
Constraints
- 1 ≤ n ≤ 14
- Each frequency is a positive integer ≤ 200, and all frequencies are distinct.