n, m = map(int, input().split())
bad = []
for i in range(m):
    bad.append(int(input()))
dp = [0 for x in range(n+1)]
dp[0] = 1
idx = 0
if m > 0 and bad[0] == 1:
    dp[1] = 0
    idx = 1
else:
    dp[1] = 1

for i in range(2, n+1):
    if idx < m and i == bad[idx]:
        dp[i] = 0
        idx+=1
    else:
        dp[i] = (dp[i-1] + dp[i-2]) % 1000000007

print(dp[n])


 n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m bad = [] bad [] for i in range(m):
    bad.append(int(input())) i range(m) range m bad.append(int(input())) bad.append bad append int(input()) int input() input 0 for x in range(n+1) for x in range(n+1) x range(n+1) range n+1 n 1 for x in range(n+1) 0 dp = [0 for x in range(n+1)] dp [0 for x in range(n+1)] dp[0] = 1 dp[0] dp 0 1 idx = 0 idx 0 if m > 0 and bad[0] == 1:
    dp[1] = 0
    idx = 1
else:
    dp[1] = 1 m > 0 and bad[0] == 1 m > 0 m 0 bad[0] == 1 bad[0] bad 0 1 dp[1] = 0 dp[1] dp 1 0 idx = 1 idx 1 dp[1] = 1 dp[1] dp 1 1 for i in range(2, n+1):
    if idx < m and i == bad[idx]:
        dp[i] = 0
        idx+=1
    else:
        dp[i] = (dp[i-1] + dp[i-2]) % 1000000007 i range(2, n+1) range 2 n+1 n 1 if idx < m and i == bad[idx]:
        dp[i] = 0
        idx+=1
    else:
        dp[i] = (dp[i-1] + dp[i-2]) % 1000000007 idx < m and i == bad[idx] idx < m idx m i == bad[idx] i bad[idx] bad idx dp[i] = 0 dp[i] dp i 0 idx+=1 idx 1 dp[i] = (dp[i-1] + dp[i-2]) % 1000000007 dp[i] dp i (dp[i-1] + dp[i-2]) % 1000000007 dp[i-1] + dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 1000000007 print(dp[n]) print dp[n] dp n idx+=1 1 idx idx = 0 0 idx idx = 1 1 idx n, m = map(int, input().split()) map(int, input().split()) n m = map(int, input().split()) map(int, input().split()) m bad = [] [] bad dp = [0 for x in range(n+1)] [0 for x in range(n+1)] dp
n, m = map(int, input().split())
bad = []
for i in range(m):
    bad.append(int(input()))
dp = [0 for x in range(n+1)]
dp[0] = 1
idx = 0
if m > 0 and bad[0] == 1:
    dp[1] = 0
    idx = 1
else:
    dp[1] = 1

for i in range(2, n+1):
    if idx < m and i == bad[idx]:
        dp[i] = 0
        idx+=1
    else:
        dp[i] = (dp[i-1] + dp[i-2]) % 1000000007

print(dp[n])



