broken_step = []
     
line = [int(s) for s in input().split()]
     
N, M = line[0], line[1]
     
for i in range(M):
    step_num = int(input().split()[0])
    broken_step.append(step_num)
        
        
dp = [0]*(N+1)
dp[0] = 1
if 1 in broken_step:
    dp[1] = 0
else:
    dp[1] = 1
     
for i in range(2, N+1):
    dp[i] = (dp[i-1]+dp[i-2])%(10**9 + 7) if i not in broken_step else 0
print(dp[N])