from sys import stdin
N,M = [int(x) for x in stdin.readline().rstrip().split()]
data = [0] * M
for _ in range(M):
    data[_] = (int(stdin.readline().rstrip()))
 
ans = [1] + [0] * (N)
if 1 in data != True:
    ans[1] = 1
for i in range(1,N + 1):
    if i in data:
      ans[i] = 0
    else:
      ans[i] = ans[i-1] + ans[i-2]
print(ans[-1] % 1000000007)