n,m = map(int,input().split())
a = [int(input()) for i in range(m)]

cnt2 = 0
cnt1 = 1

for i in range(1,n):
    if i in a:
        cnt2, cnt1 = cnt1, 0
    else:
        cnt2, cnt1 = cnt1, cnt2+cnt1
else:
    ans = (cnt2+cnt1)%1000000007

print(ans)
