N, M = map(int, input().split())
a = [True] * (N + 1)
for _ in range(M):
    a[int(input())] = False


arr = [0] * (N + 1)
arr[1] = 1 if a[1] else 0
arr[2] = arr[1] + 1 if a[2] else 0

for i in range(3, N + 1):
    arr[i] = arr[i - 2] + arr[i - 1] if a[i] else 0

print(arr[N] % 1000000007)