N, M = [int(x) for x in input().split()]
A = [int(input()) for _ in range(M)]

aset = set(A)
MOD = 10 ** 9 + 7

dp = [0] * (N + 1)

if 1 not in aset:
    dp[1] = 1

if 2 not in aset and N >= 2:
    dp[2] += dp[1] + 1

for i in range(3, N + 1):
    if i in aset:
        continue

    dp[i] += dp[i - 1]
    dp[i] += dp[i - 2]

print(dp[N] % MOD) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x N, M = [int(x) for x in input().split()] N [int(x) for x in 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)] aset = set(A) aset set(A) set A MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 dp = [0] * (N + 1) dp [0] * (N + 1) [0] 0 N + 1 N 1 if 1 not in aset:
    dp[1] = 1 1 not in aset 1 aset dp[1] = 1 dp[1] dp 1 1 if 2 not in aset and N >= 2:
    dp[2] += dp[1] + 1 2 not in aset and N >= 2 2 not in aset 2 aset N >= 2 N 2 dp[2] += dp[1] + 1 dp[2] dp 2 dp[1] + 1 dp[1] dp 1 1 for i in range(3, N + 1):
    if i in aset:
        continue

    dp[i] += dp[i - 1]
    dp[i] += dp[i - 2] i range(3, N + 1) range 3 N + 1 N 1 if i in aset:
        continue

     i in aset i aset continue dp[i] += dp[i - 1] dp[i] dp i dp[i - 1] dp i - 1 i 1 dp[i] += dp[i - 2] dp[i] dp i dp[i - 2] dp i - 2 i 2 print(dp[N] % MOD) print dp[N] % MOD dp[N] dp N MOD aset = set(A) set(A) aset N, M = [int(x) for x in input().split()] [int(x) for x in input().split()] N M = [int(x) for x in input().split()] [int(x) for x in input().split()] M A = [int(input()) for _ in range(M)] [int(input()) for _ in range(M)] A dp = [0] * (N + 1) [0] * (N + 1) dp MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD
N, M = [int(x) for x in input().split()]
A = [int(input()) for _ in range(M)]

aset = set(A)
MOD = 10 ** 9 + 7

dp = [0] * (N + 1)

if 1 not in aset:
    dp[1] = 1

if 2 not in aset and N >= 2:
    dp[2] += dp[1] + 1

for i in range(3, N + 1):
    if i in aset:
        continue

    dp[i] += dp[i - 1]
    dp[i] += dp[i - 2]

print(dp[N] % MOD)
