import sys

input = sys.stdin.readline
mod = 10 ** 9 + 7
n, m = map(int, input().split())
dp = [0] * (n + 1)
dp[0] = 1
ng = set(int(input()) for _ in range(m))

for i in range(n):
    next1 = i + 1
    if next1 not in ng:
        dp[next1] += dp[i]
        dp[next1] %= mod
    next2 = i + 2
    if next2 not in ng and next2 <= n:
        dp[next2] += dp[i]
        dp[next2] %= mod
print(dp[-1]) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline mod = 10 ** 9 + 7 mod 10 ** 9 + 7 10 ** 9 10 9 7 n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m dp = [0] * (n + 1) dp [0] * (n + 1) [0] 0 n + 1 n 1 dp[0] = 1 dp[0] dp 0 1 ng = set(int(input()) for _ in range(m)) ng set(int(input()) for _ in range(m)) set int(input()) int input() input for i in range(n):
    next1 = i + 1
    if next1 not in ng:
        dp[next1] += dp[i]
        dp[next1] %= mod
    next2 = i + 2
    if next2 not in ng and next2 <= n:
        dp[next2] += dp[i]
        dp[next2] %= mod i range(n) range n next1 = i + 1 next1 i + 1 i 1 if next1 not in ng:
        dp[next1] += dp[i]
        dp[next1] %= mod
     next1 not in ng next1 ng dp[next1] += dp[i] dp[next1] dp next1 dp[i] dp i dp[next1] %= mod dp[next1] dp next1 mod next2 = i + 2 next2 i + 2 i 2 if next2 not in ng and next2 <= n:
        dp[next2] += dp[i]
        dp[next2] %= mod next2 not in ng and next2 <= n next2 not in ng next2 ng next2 <= n next2 n dp[next2] += dp[i] dp[next2] dp next2 dp[i] dp i dp[next2] %= mod dp[next2] dp next2 mod print(dp[-1]) print dp[-1] dp -1 n, m = map(int, input().split()) map(int, input().split()) n m = map(int, input().split()) map(int, input().split()) m next1 = i + 1 i + 1 next1 next2 = i + 2 i + 2 next2 mod = 10 ** 9 + 7 10 ** 9 + 7 mod dp = [0] * (n + 1) [0] * (n + 1) dp input = sys.stdin.readline sys.stdin.readline input ng = set(int(input()) for _ in range(m)) set(int(input()) for _ in range(m)) ng
import sys

input = sys.stdin.readline
mod = 10 ** 9 + 7
n, m = map(int, input().split())
dp = [0] * (n + 1)
dp[0] = 1
ng = set(int(input()) for _ in range(m))

for i in range(n):
    next1 = i + 1
    if next1 not in ng:
        dp[next1] += dp[i]
        dp[next1] %= mod
    next2 = i + 2
    if next2 not in ng and next2 <= n:
        dp[next2] += dp[i]
        dp[next2] %= mod
print(dp[-1])