if __name__ == '__main__':
   n, m = map(int,input().split())
   a = set([int(input()) for i in range(m)])
   broken = [False] * (n+1)
   for i in range(n+1):
      if i in a:
         broken[i] = True

   MOD = 1000000007


   dp = [0 for i in range(n+1)]
   dp[0] = 1
   if 1 in a:
      dp[1] = 0
   else:
      dp[1] = 1

   for i in range(2,n+1):
      if broken[i-1] and broken[i-2]:
         dp[i] = 0
      elif broken[i-1]:
         dp[i] = dp[i-2] % MOD
      elif broken[i-2]:
         dp[i] = dp[i-1] % MOD
      else:
         dp[i] = (dp[i-1] + dp[i-2]) % MOD

   print(dp[n]) if __name__ == '__main__':
   n, m = map(int,input().split())
   a = set([int(input()) for i in range(m)])
   broken = [False] * (n+1)
   for i in range(n+1):
      if i in a:
         broken[i] = True

   MOD = 1000000007


   dp = [0 for i in range(n+1)]
   dp[0] = 1
   if 1 in a:
      dp[1] = 0
   else:
      dp[1] = 1

   for i in range(2,n+1):
      if broken[i-1] and broken[i-2]:
         dp[i] = 0
      elif broken[i-1]:
         dp[i] = dp[i-2] % MOD
      elif broken[i-2]:
         dp[i] = dp[i-1] % MOD
      else:
         dp[i] = (dp[i-1] + dp[i-2]) % MOD

   print(dp[n]) __name__ == '__main__' __name__ '__main__' n, m = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m int(input()) for i in range(m) for i in range(m) i range(m) range m for i in range(m) int(input()) int input() input a = set([int(input()) for i in range(m)]) a set([int(input()) for i in range(m)]) set [int(input()) for i in range(m)] broken = [False] * (n+1) broken [False] * (n+1) [False] False n+1 n 1 for i in range(n+1):
      if i in a:
         broken[i] = True

    i range(n+1) range n+1 n 1 if i in a:
         broken[i] = True

    i in a i a broken[i] = True broken[i] broken i True MOD = 1000000007 MOD 1000000007 0 for i in range(n+1) for i in range(n+1) i range(n+1) range n+1 n 1 for i in range(n+1) 0 dp = [0 for i in range(n+1)] dp [0 for i in range(n+1)] dp[0] = 1 dp[0] dp 0 1 if 1 in a:
      dp[1] = 0
   else:
      dp[1] = 1

    1 in a 1 a dp[1] = 0 dp[1] dp 1 0 dp[1] = 1 dp[1] dp 1 1 for i in range(2,n+1):
      if broken[i-1] and broken[i-2]:
         dp[i] = 0
      elif broken[i-1]:
         dp[i] = dp[i-2] % MOD
      elif broken[i-2]:
         dp[i] = dp[i-1] % MOD
      else:
         dp[i] = (dp[i-1] + dp[i-2]) % MOD

    i range(2,n+1) range 2 n+1 n 1 if broken[i-1] and broken[i-2]:
         dp[i] = 0
      elif broken[i-1]:
         dp[i] = dp[i-2] % MOD
      elif broken[i-2]:
         dp[i] = dp[i-1] % MOD
      else:
         dp[i] = (dp[i-1] + dp[i-2]) % MOD

    broken[i-1] and broken[i-2] broken[i-1] broken i-1 i 1 broken[i-2] broken i-2 i 2 dp[i] = 0 dp[i] dp i 0 elif broken[i-1]:
         dp[i] = dp[i-2] % MOD
       broken[i-1] broken i-1 i 1 dp[i] = dp[i-2] % MOD dp[i] dp i dp[i-2] % MOD dp[i-2] dp i-2 i 2 MOD elif broken[i-2]:
         dp[i] = dp[i-1] % MOD
       broken[i-2] broken i-2 i 2 dp[i] = dp[i-1] % MOD dp[i] dp i dp[i-1] % MOD dp[i-1] dp i-1 i 1 MOD dp[i] = (dp[i-1] + dp[i-2]) % MOD dp[i] dp i (dp[i-1] + dp[i-2]) % MOD dp[i-1] + dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 MOD print(dp[n]) print dp[n] dp n m = map(int,input().split()) map(int,input().split()) m dp = [0 for i in range(n+1)] [0 for i in range(n+1)] dp n, m = map(int,input().split()) map(int,input().split()) n a = set([int(input()) for i in range(m)]) set([int(input()) for i in range(m)]) a broken = [False] * (n+1) [False] * (n+1) broken MOD = 1000000007 1000000007 MOD
if __name__ == '__main__':
   n, m = map(int,input().split())
   a = set([int(input()) for i in range(m)])
   broken = [False] * (n+1)
   for i in range(n+1):
      if i in a:
         broken[i] = True

   MOD = 1000000007


   dp = [0 for i in range(n+1)]
   dp[0] = 1
   if 1 in a:
      dp[1] = 0
   else:
      dp[1] = 1

   for i in range(2,n+1):
      if broken[i-1] and broken[i-2]:
         dp[i] = 0
      elif broken[i-1]:
         dp[i] = dp[i-2] % MOD
      elif broken[i-2]:
         dp[i] = dp[i-1] % MOD
      else:
         dp[i] = (dp[i-1] + dp[i-2]) % MOD

   print(dp[n])
