n=int(eval(input()))



#データを並び替える

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

rowdata.sort()



#nが偶数の時

if n%2==0:

    check=[]

    a=1

    for i in range(1,n,2):

        check.append(i)

        check.append(i)

    if check==rowdata:

        for i in range(int(n/2)):

            a*=2

            a=a%1000000007

        print(a)

    else:

        print((0))

        

#nが奇数の時

else:

    check=[]

    a=1

    if n==1:

        check=[0]

    else:

        for i in range(0,n,2):

            if i==0:

                check.append(i)

            else:

                check.append(i)

                check.append(i)

    if check==rowdata:

        for i in range(int((n-1)/2)):

            a*=2

            a=a%1000000007

        print(a)

    else:

        print((0))
n=int(eval(input()))

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



def somosomo(a):

    ans=[]

    if n%2==1:

        ans.append(0)

        for i in range(1,n//2+1):

            ans.append(i*2)

            ans.append(i*2)

        b=sorted(a)

        if b==ans:

            return True

        return False

    else:

        for i in range(1,n//2+1):

            ans.append(i*2-1)

            ans.append(i*2-1)

        b=sorted(a)

        if b==ans:

            return True

        return False



def two_ride(n):

    ans=1

    for i in range(n):

        ans*=2

        ans%=10**9+7

    return ans



if somosomo(a):

    print((two_ride(n//2)))

else:

    print((0))
n = int(eval(input()))
# データを並び替える
rowdata = [int(i) for i in input().split()]
rowdata.sort()
# nが偶数の時
if n % 2 == 0:
    check = []
    a = 1
    for i in range(1, n, 2):
        check.append(i)
        check.append(i)
    if check == rowdata:
        for i in range(int(n / 2)):
            a *= 2
            a = a % 1000000007
        print(a)
    else:
        print((0))
# nが奇数の時
else:
    check = []
    a = 1
    if n == 1:
        check = [0]
    else:
        for i in range(0, n, 2):
            if i == 0:
                check.append(i)
            else:
                check.append(i)
                check.append(i)
    if check == rowdata:
        for i in range(int((n - 1) / 2)):
            a *= 2
            a = a % 1000000007
        print(a)
    else:
        print((0))

n = int(eval(input()))
a = [int(i) for i in input().split()]


def somosomo(a):
    ans = []
    if n % 2 == 1:
        ans.append(0)
        for i in range(1, n // 2 + 1):
            ans.append(i * 2)
            ans.append(i * 2)
        b = sorted(a)
        if b == ans:
            return True
        return False
    else:
        for i in range(1, n // 2 + 1):
            ans.append(i * 2 - 1)
            ans.append(i * 2 - 1)
        b = sorted(a)
        if b == ans:
            return True
        return False


def two_ride(n):
    ans = 1
    for i in range(n):
        ans *= 2
        ans %= 10**9 + 7
    return ans


if somosomo(a):
    print((two_ride(n // 2)))
else:
    print((0))

-# データを並び替える -rowdata = [int(i) for i in input().split()] -rowdata.sort() -# nが偶数の時 -if n % 2 == 0: -    check = [] -    a = 1 -    for i in range(1, n, 2): -        check.append(i) -        check.append(i) -    if check == rowdata: -        for i in range(int(n / 2)): -            a *= 2 -            a = a % 1000000007 -        print(a) +a = [int(i) for i in input().split()] + + +def somosomo(a): +    ans = [] +    if n % 2 == 1: +        ans.append(0) +        for i in range(1, n // 2 + 1): +            ans.append(i * 2) +            ans.append(i * 2) +        b = sorted(a) +        if b == ans: +            return True +        return False -        print((0)) -# nが奇数の時 +        for i in range(1, n // 2 + 1): +            ans.append(i * 2 - 1) +            ans.append(i * 2 - 1) +        b = sorted(a) +        if b == ans: +            return True +        return False + + +def two_ride(n): +    ans = 1 +    for i in range(n): +        ans *= 2 +        ans %= 10**9 + 7 +    return ans + + +if somosomo(a): +    print((two_ride(n // 2))) -    check = [] -    a = 1 -    if n == 1: -        check = [0] -    else: -        for i in range(0, n, 2): -            if i == 0: -                check.append(i) -            else: -                check.append(i) -                check.append(i) -    if check == rowdata: -        for i in range(int((n - 1) / 2)): -            a *= 2 -            a = a % 1000000007 -        print(a) -    else: -        print((0)) +    print((0))