# ABC129 C

MOD = 10**9 + 7
n, m = map(int, input().split())
a_l = [int(input()) for _ in range(m)]

dp = [0] * (n+1)
dp[0] = 1
k = 0
if m > 0 and a_l[0] == 1:
    k = min(k+1, m-1)
else:
    dp[1] = 1

for i in range(2, n+1):
    if m > 0 and i == a_l[k]:
        k = min(k+1, m-1)
        continue
    dp[i] = (dp[i-1] + dp[i-2]) % MOD
    
print(dp[n]) MOD = 10**9 + 7 MOD 10**9 + 7 10**9 10 9 7 n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input 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_l = [int(input()) for _ in range(m)] a_l [int(input()) for _ in range(m)] dp = [0] * (n+1) dp [0] * (n+1) [0] 0 n+1 n 1 dp[0] = 1 dp[0] dp 0 1 k = 0 k 0 if m > 0 and a_l[0] == 1:
    k = min(k+1, m-1)
else:
    dp[1] = 1 m > 0 and a_l[0] == 1 m > 0 m 0 a_l[0] == 1 a_l[0] a_l 0 1 k = min(k+1, m-1) k min(k+1, m-1) min k+1 k 1 m-1 m 1 dp[1] = 1 dp[1] dp 1 1 for i in range(2, n+1):
    if m > 0 and i == a_l[k]:
        k = min(k+1, m-1)
        continue
    dp[i] = (dp[i-1] + dp[i-2]) % MOD
     i range(2, n+1) range 2 n+1 n 1 if m > 0 and i == a_l[k]:
        k = min(k+1, m-1)
        continue
     m > 0 and i == a_l[k] m > 0 m 0 i == a_l[k] i a_l[k] a_l k k = min(k+1, m-1) k min(k+1, m-1) min k+1 k 1 m-1 m 1 continue dp[i] = (dp[i-1] + dp[i-2]) % MOD dp[i] dp i (dp[i-1] + dp[i-2]) % MOD dp[i-1] + dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 MOD print(dp[n]) print dp[n] dp n k = min(k+1, m-1) min(k+1, m-1) k MOD = 10**9 + 7 10**9 + 7 MOD a_l = [int(input()) for _ in range(m)] [int(input()) for _ in range(m)] a_l k = 0 0 k k = min(k+1, m-1) min(k+1, m-1) k dp = [0] * (n+1) [0] * (n+1) dp n, m = map(int, input().split()) map(int, input().split()) n m = map(int, input().split()) map(int, input().split()) m
# ABC129 C

MOD = 10**9 + 7
n, m = map(int, input().split())
a_l = [int(input()) for _ in range(m)]

dp = [0] * (n+1)
dp[0] = 1
k = 0
if m > 0 and a_l[0] == 1:
    k = min(k+1, m-1)
else:
    dp[1] = 1

for i in range(2, n+1):
    if m > 0 and i == a_l[k]:
        k = min(k+1, m-1)
        continue
    dp[i] = (dp[i-1] + dp[i-2]) % MOD
    
print(dp[n])