def hoge():
  dp = [0] * (n + 5)
  dp[0] = 0
  dp[1] = 2
  for i in range(2, n):
    if step_list[i - 1] == True:
      dp[i] = dp[i - 2] + dp[i - 1]
  print(step_list)
  print(dp)
  return dp[n - 1]

def solve():
  global n, m, a_list, step_list
  n, m = map(int, input().split())
  a_list = [0] * m
  step_list = [True] * (n + 5)
  for i in range(m):
    a_list[i] = int(input())
    step_list[a_list[i]] = False
  ans = hoge()
  print(ans % 1000000007)
  return 0

if __name__ == "__main__":
  solve()