n, m = map(int, input().split())
count = [[0, 0] for _ in range(n+1)]
for _ in range(m):
    a = int(input())
    count[a][1] = -1
count[0][0] = 1
count[1][0] = 1

for i in range(2, n+1):
    if -1 == count[i][1] and -1 == count[i-1][1]:
        print(0)
        exit(0)
    if -1 == count[i][1]:
        continue
    count[i][0] = count[i-1][0] + count[i-2][0]
print(count[n][0] % 1000000007)
