#!/usr/bin/env python3

# from numba import njit

# input = stdin.readline
MOD = 10**9+7
# @njit
def solve(n,a):
  # ～段目と対応
  stairs = [1]*(n+10)
  for x in a:
    stairs[x] = 0

  dp = [1] + [0] * (n+1)
  dp[1] = stairs[1]
  for i in range(n):
    dp[i+2] = (dp[i] + dp[i+1]) * stairs[i+2]
    dp[i+2] %= MOD

  return dp[n]



def main():
  N,M = map(int,input().split())
  a = [int(input()) for _ in range(M)]
  print(solve(N,a))
  return

if __name__ == '__main__':
  main() MOD = 10**9+7 MOD 10**9+7 10**9 10 9 7 def solve(n,a):
  # ～段目と対応
  stairs = [1]*(n+10)
  for x in a:
    stairs[x] = 0

  dp = [1] + [0] * (n+1)
  dp[1] = stairs[1]
  for i in range(n):
    dp[i+2] = (dp[i] + dp[i+1]) * stairs[i+2]
    dp[i+2] %= MOD

  return dp[n] solve stairs = [1]*(n+10) stairs [1]*(n+10) [1] 1 n+10 n 10 for x in a:
    stairs[x] = 0

   x a stairs[x] = 0 stairs[x] stairs x 0 dp = [1] + [0] * (n+1) dp [1] + [0] * (n+1) [1] 1 [0] * (n+1) [0] 0 n+1 n 1 dp[1] = stairs[1] dp[1] dp 1 stairs[1] stairs 1 for i in range(n):
    dp[i+2] = (dp[i] + dp[i+1]) * stairs[i+2]
    dp[i+2] %= MOD

   i range(n) range n dp[i+2] = (dp[i] + dp[i+1]) * stairs[i+2] dp[i+2] dp i+2 i 2 (dp[i] + dp[i+1]) * stairs[i+2] dp[i] + dp[i+1] dp[i] dp i dp[i+1] dp i+1 i 1 stairs[i+2] stairs i+2 i 2 dp[i+2] %= MOD dp[i+2] dp i+2 i 2 MOD return dp[n] dp[n] dp n n n a a def main():
  N,M = map(int,input().split())
  a = [int(input()) for _ in range(M)]
  print(solve(N,a))
  return main N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M int(input()) for _ in range(M) for _ in range(M) _ range(M) range M for _ in range(M) int(input()) int input() input a = [int(input()) for _ in range(M)] a [int(input()) for _ in range(M)] print(solve(N,a)) print solve(N,a) solve N a return if __name__ == '__main__':
  main() __name__ == '__main__' __name__ '__main__' main() main def main():
  N,M = map(int,input().split())
  a = [int(input()) for _ in range(M)]
  print(solve(N,a))
  return def main():
  N,M = map(int,input().split())
  a = [int(input()) for _ in range(M)]
  print(solve(N,a))
  return main MOD = 10**9+7 10**9+7 MOD def solve(n,a):
  # ～段目と対応
  stairs = [1]*(n+10)
  for x in a:
    stairs[x] = 0

  dp = [1] + [0] * (n+1)
  dp[1] = stairs[1]
  for i in range(n):
    dp[i+2] = (dp[i] + dp[i+1]) * stairs[i+2]
    dp[i+2] %= MOD

  return dp[n] def solve(n,a):
  # ～段目と対応
  stairs = [1]*(n+10)
  for x in a:
    stairs[x] = 0

  dp = [1] + [0] * (n+1)
  dp[1] = stairs[1]
  for i in range(n):
    dp[i+2] = (dp[i] + dp[i+1]) * stairs[i+2]
    dp[i+2] %= MOD

  return dp[n] solve
#!/usr/bin/env python3

# from numba import njit

# input = stdin.readline
MOD = 10**9+7
# @njit
def solve(n,a):
  # ～段目と対応
  stairs = [1]*(n+10)
  for x in a:
    stairs[x] = 0

  dp = [1] + [0] * (n+1)
  dp[1] = stairs[1]
  for i in range(n):
    dp[i+2] = (dp[i] + dp[i+1]) * stairs[i+2]
    dp[i+2] %= MOD

  return dp[n]



def main():
  N,M = map(int,input().split())
  a = [int(input()) for _ in range(M)]
  print(solve(N,a))
  return

if __name__ == '__main__':
  main()
