
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])-1
    broken_step.append(step_num)
    
    
dp = list(range(N))
if 0 in broken_step and 1 not in broken_step:
    dp[0] = 0
    dp[1] = 1
elif 0 not in broken_step and 1 not in broken_step:
    dp[0] = 1
    dp[1] = 2
elif 0 in broken_step and 1 in broken_step:
    dp[0] = 0
    dp[1] = 0
else:
    dp[0] = 1
    dp[1] = 0
    

for i in range(N-2):
    dp[i+2] = dp[i]+dp[i+1] if i+2 not in broken_step else 0
    
print(dp[N-1]%1000000007)