N, M = tuple(map(int, input().split()))
ans = 0
a = []
tmp = -10
d = 10**9 + 7

for i in range(M):
    num = (int(input()))
    if ((tmp+1) == num):
        print(0)
        exit()
    a.append(num)
    tmp = num

def stairs(n):
    if (n in a):
        return 0
    if (n == 1):
        return 1
    if (n == 2):
        return 2
    ans = stairs(n-1)%d + stairs(n-2)%d
    return ans

print(stairs(N))
