# coding: utf-8

n, m = map(int, input().split())
ans = [0 for _ in range(n+1)]
z = 10**9 + 7

a_list = [int(input()) for _ in range(m)]
# print(a_list)

ans[0] = 1
if 1 not in a_list:
    ans[1] = 1
else:
    ans[1] = 0
        
for i in range(2, n+1):
    if i in a_list:
        ans[i] = 0
    else:
        ans[i] += ans[i-1]+ans[i-2]
        
# print(ans)
print(int(ans[-1]%z))