import sys

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

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 = 1000000007 mod 1000000007 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() ng set() set for _ in range(m):
    a = int(input())
    ng.add(a) _ range(m) range m a = int(input()) a int(input()) int input() input ng.add(a) ng.add ng add a 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 mod = 1000000007 1000000007 mod m = map(int, input().split()) map(int, input().split()) m n, m = map(int, input().split()) map(int, input().split()) n dp = [0] * (n + 1) [0] * (n + 1) dp a = int(input()) int(input()) a next1 = i + 1 i + 1 next1 ng = set() set() ng next2 = i + 2 i + 2 next2 input = sys.stdin.readline sys.stdin.readline input
import sys

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

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])