import sys

mod = 1000000007

N, M = map(int, sys.stdin.readline().split())
A = set()
for _ in range(M):
    a = int(sys.stdin.readline())
    A.add(a)

dp = [0] * (N+1)
dp[0] = 1
dp[1] = 0 if 1 in A else 1
for i in range(1, N):
    if i+1 in A:
        continue
    dp[i+1] = dp[i] + dp[i-1]
    dp[i+1] %= mod

# print(dp)
print(dp[N]) import sys sys mod = 1000000007 mod 1000000007 N, M = map(int, sys.stdin.readline().split()) N map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split M A = set() A set() set for _ in range(M):
    a = int(sys.stdin.readline())
    A.add(a) _ range(M) range M a = int(sys.stdin.readline()) a int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline A.add(a) A.add A add a dp = [0] * (N+1) dp [0] * (N+1) [0] 0 N+1 N 1 dp[0] = 1 dp[0] dp 0 1 dp[1] = 0 if 1 in A else 1 dp[1] dp 1 0 if 1 in A else 1 1 in A 1 A 0 1 for i in range(1, N):
    if i+1 in A:
        continue
    dp[i+1] = dp[i] + dp[i-1]
    dp[i+1] %= mod

# print(dp) i range(1, N) range 1 N if i+1 in A:
        continue
     i+1 in A i+1 i 1 A continue dp[i+1] = dp[i] + dp[i-1] dp[i+1] dp i+1 i 1 dp[i] + dp[i-1] dp[i] dp i dp[i-1] dp i-1 i 1 dp[i+1] %= mod dp[i+1] dp i+1 i 1 mod print(dp[N]) print dp[N] dp N A = set() set() A M = map(int, sys.stdin.readline().split()) map(int, sys.stdin.readline().split()) M a = int(sys.stdin.readline()) int(sys.stdin.readline()) a mod = 1000000007 1000000007 mod N, M = map(int, sys.stdin.readline().split()) map(int, sys.stdin.readline().split()) N dp = [0] * (N+1) [0] * (N+1) dp
import sys

mod = 1000000007

N, M = map(int, sys.stdin.readline().split())
A = set()
for _ in range(M):
    a = int(sys.stdin.readline())
    A.add(a)

dp = [0] * (N+1)
dp[0] = 1
dp[1] = 0 if 1 in A else 1
for i in range(1, N):
    if i+1 in A:
        continue
    dp[i+1] = dp[i] + dp[i-1]
    dp[i+1] %= mod

# print(dp)
print(dp[N])