N,M = map(int,input().split())
ans = 1
bool = 0
broken = [-1]
for i in range(M):
  K = int(input())
  broken.append(K)
broken.append(N+1)
for i in range(len(broken)-1):
  if broken[i+1] - broken[i] == 1:
    print(0)
    bool = 1
if bool == 0:
  dp = [0]*(N+1)
  dp[0]= 1
  dp[1]= 1
  for k in range(1,N+1):
    if k == 1:
      if k in broken:
        dp[k] = 0
      else:
        dp[1] = 1
    else:
      if k in broken:
        dp[k] = 0
      else:
        dp[k] = dp[k-2]+dp[k-1]
  print(dp[N]%(10**9+7))