#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc129_c

mod = 1000000007
N, M = map(int, input().strip().split())
a = [int(input()) for _ in range(M)]
a.append(N+1)

def fibonacci(x):
    a = 1
    b = 1
    if x <= 2:
        return a
    else:
        for _ in range(x-2):
            tmp = a
            a = b
            b = tmp + b
        return b

res = 1
prev_a = -1
for cur_a in a:
    if  cur_a - prev_a == 1:
        res = 0
        break
    res *= fibonacci(cur_a - prev_a - 1) % mod
    res %= mod
    prev_a = cur_a
    continue

print(res) mod = 1000000007 mod 1000000007 N, M = map(int, input().strip().split()) N map(int, input().strip().split()) map int input().strip().split() ().strip().split ().strip() ().strip () input strip split M int(input()) for _ in range(M) for _ in range(M) _ range(M) range M for _ in range(M) int(input()) int input() input a = [int(input()) for _ in range(M)] a [int(input()) for _ in range(M)] a.append(N+1) a.append a append N+1 N 1 def fibonacci(x):
    a = 1
    b = 1
    if x <= 2:
        return a
    else:
        for _ in range(x-2):
            tmp = a
            a = b
            b = tmp + b
        return b fibonacci a = 1 a 1 b = 1 b 1 if x <= 2:
        return a
    else:
        for _ in range(x-2):
            tmp = a
            a = b
            b = tmp + b
        return b x <= 2 x 2 return a a for _ in range(x-2):
            tmp = a
            a = b
            b = tmp + b
         _ range(x-2) range x-2 x 2 tmp = a tmp a a = b a b b = tmp + b b tmp + b tmp b return b b x x res = 1 res 1 prev_a = -1 prev_a -1 for cur_a in a:
    if  cur_a - prev_a == 1:
        res = 0
        break
    res *= fibonacci(cur_a - prev_a - 1) % mod
    res %= mod
    prev_a = cur_a
    continue cur_a a if  cur_a - prev_a == 1:
        res = 0
        break
     cur_a - prev_a == 1 cur_a - prev_a cur_a prev_a 1 res = 0 res 0 break res *= fibonacci(cur_a - prev_a - 1) % mod res fibonacci(cur_a - prev_a - 1) % mod fibonacci(cur_a - prev_a - 1) fibonacci cur_a - prev_a - 1 cur_a - prev_a cur_a prev_a 1 mod res %= mod res mod prev_a = cur_a prev_a cur_a continue print(res) print res M = map(int, input().strip().split()) map(int, input().strip().split()) M N, M = map(int, input().strip().split()) map(int, input().strip().split()) N def fibonacci(x):
    a = 1
    b = 1
    if x <= 2:
        return a
    else:
        for _ in range(x-2):
            tmp = a
            a = b
            b = tmp + b
        return b def fibonacci(x):
    a = 1
    b = 1
    if x <= 2:
        return a
    else:
        for _ in range(x-2):
            tmp = a
            a = b
            b = tmp + b
        return b fibonacci res = 1 1 res res *= fibonacci(cur_a - prev_a - 1) % mod fibonacci(cur_a - prev_a - 1) % mod res mod = 1000000007 1000000007 mod prev_a = -1 -1 prev_a prev_a = cur_a cur_a prev_a res %= mod mod res a = [int(input()) for _ in range(M)] [int(input()) for _ in range(M)] a res = 0 0 res
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc129_c

mod = 1000000007
N, M = map(int, input().strip().split())
a = [int(input()) for _ in range(M)]
a.append(N+1)

def fibonacci(x):
    a = 1
    b = 1
    if x <= 2:
        return a
    else:
        for _ in range(x-2):
            tmp = a
            a = b
            b = tmp + b
        return b

res = 1
prev_a = -1
for cur_a in a:
    if  cur_a - prev_a == 1:
        res = 0
        break
    res *= fibonacci(cur_a - prev_a - 1) % mod
    res %= mod
    prev_a = cur_a
    continue

print(res)
