from collections import defaultdict



n = int(eval(input()))

A = [int(i) for i in input().split()]

p = 10 ** 9 + 7



m = n % 2 == 0

cnt = defaultdict(int)



for a in A:

    if (a % 2 == 0) == m:

        print((0))

        exit()

    cnt[a] += 1

    if cnt[a] > 2 or cnt[0] > 1:

        print((0))

        exit()



print((pow(2, (n//2), p)))
from collections import defaultdict



n = int(eval(input()))

A = [int(i) for i in input().split()]

p = 10 ** 9 + 7



m = n % 2 == 0

cnt = defaultdict(int)



for a in A:

    if (a % 2 == 0) == m:

        print((0))

        exit()

    cnt[a] += 1



if cnt[0] > 1:

    print((0))

    exit(0)



del cnt[0]



for c in list(cnt.values()):

    if c != 2:

        print((0))

        exit(0)



print((pow(2, (n//2), p)))
from collections import defaultdict

n = int(eval(input()))
A = [int(i) for i in input().split()]
p = 10**9 + 7
m = n % 2 == 0
cnt = defaultdict(int)
for a in A:
    if (a % 2 == 0) == m:
        print((0))
        exit()
    cnt[a] += 1
    if cnt[a] > 2 or cnt[0] > 1:
        print((0))
        exit()
print((pow(2, (n // 2), p)))

from collections import defaultdict

n = int(eval(input()))
A = [int(i) for i in input().split()]
p = 10**9 + 7
m = n % 2 == 0
cnt = defaultdict(int)
for a in A:
    if (a % 2 == 0) == m:
        print((0))
        exit()
    cnt[a] += 1
if cnt[0] > 1:
    print((0))
    exit(0)
del cnt[0]
for c in list(cnt.values()):
    if c != 2:
        print((0))
        exit(0)
print((pow(2, (n // 2), p)))

-    if cnt[a] > 2 or cnt[0] > 1: +if cnt[0] > 1: +    print((0)) +    exit(0) +del cnt[0] +for c in list(cnt.values()): +    if c != 2: -        exit() +        exit(0)