let N = Int(readLine()!)!
let A = readLine()!.characters.split(" ").map{Int(String($0))!}.sort()
let tmp = (0..<N).map{$0+($0+N+1)%2}
if N == 1 {
    print(1)
} else if A == tmp {
    print(2<<(N/2-1))
} else {
    print(0)
}