from collections import defaultdict

stairs = []
steps = []
MOD = 1000000007

n, m = map(int, input().split())
stairs = {int(input()):True for _ in range(m)}

step = defaultdict(int)
step[0] = 1

for i in range(n):
    if i in stairs.keys():
        step[i] = 0
    else:
        step[i+1] = (step[i] + step[i+1]) % MOD
        step[i+2] = (step[i] + step[i+2]) % MOD

print(step[n]) from collections import defaultdict stairs = [] stairs [] steps = [] steps [] MOD = 1000000007 MOD 1000000007 n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m int(input()):True for _ in range(m) for _ in range(m) _ range(m) range m for _ in range(m) int(input()) int input() input True stairs = {int(input()):True for _ in range(m)} stairs {int(input()):True for _ in range(m)} step = defaultdict(int) step defaultdict(int) defaultdict int step[0] = 1 step[0] step 0 1 for i in range(n):
    if i in stairs.keys():
        step[i] = 0
    else:
        step[i+1] = (step[i] + step[i+1]) % MOD
        step[i+2] = (step[i] + step[i+2]) % MOD i range(n) range n if i in stairs.keys():
        step[i] = 0
    else:
        step[i+1] = (step[i] + step[i+1]) % MOD
        step[i+2] = (step[i] + step[i+2]) % MOD i in stairs.keys() i stairs.keys() stairs.keys stairs keys step[i] = 0 step[i] step i 0 step[i+1] = (step[i] + step[i+1]) % MOD step[i+1] step i+1 i 1 (step[i] + step[i+1]) % MOD step[i] + step[i+1] step[i] step i step[i+1] step i+1 i 1 MOD step[i+2] = (step[i] + step[i+2]) % MOD step[i+2] step i+2 i 2 (step[i] + step[i+2]) % MOD step[i] + step[i+2] step[i] step i step[i+2] step i+2 i 2 MOD print(step[n]) print step[n] step n n, m = map(int, input().split()) map(int, input().split()) n stairs = {int(input()):True for _ in range(m)} {int(input()):True for _ in range(m)} stairs stairs = [] [] stairs MOD = 1000000007 1000000007 MOD m = map(int, input().split()) map(int, input().split()) m steps = [] [] steps step = defaultdict(int) defaultdict(int) step
from collections import defaultdict

stairs = []
steps = []
MOD = 1000000007

n, m = map(int, input().split())
stairs = {int(input()):True for _ in range(m)}

step = defaultdict(int)
step[0] = 1

for i in range(n):
    if i in stairs.keys():
        step[i] = 0
    else:
        step[i+1] = (step[i] + step[i+1]) % MOD
        step[i+2] = (step[i] + step[i+2]) % MOD

print(step[n])
