import bisect, copy, heapq, math
from math import inf
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n,m=map(int,input().split())
a=[int(input()) for i in range(m)]

dic={}
for i in range(m):
    dic[a[i]]=1
dp=[0]*(n+2)

dp[0]=1
for i in range(n):
    if i in dic:
        continue
    dp[i+1]+=dp[i]
    dp[i+2]+=dp[i]
    dp[i+1]%=mod
    dp[i+2]%=mod
print(dp[-2]) import bisect, copy, heapq, math bisect copy heapq math from math import inf import sys sys from collections import * from functools import lru_cache from itertools import accumulate, combinations, permutations, product def input():
    return sys.stdin.readline()[:-1] input return sys.stdin.readline()[:-1] sys.stdin.readline()[:-1] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline :-1 -1 def ruiseki(lst):
    return [0]+list(accumulate(lst)) ruiseki return [0]+list(accumulate(lst)) [0]+list(accumulate(lst)) [0] 0 list(accumulate(lst)) list accumulate(lst) accumulate lst lst lst def celi(a,b):
    return -(-a//b) celi return -(-a//b) -(-a//b) -a//b -a a b a a b b sys.setrecursionlimit(5000000) sys.setrecursionlimit sys setrecursionlimit 5000000 mod=pow(10,9)+7 mod pow(10,9)+7 pow(10,9) pow 10 9 7 chr(ord('a') + i) for i in range(26) for i in range(26) i range(26) range 26 for i in range(26) chr(ord('a') + i) chr ord('a') + i ord('a') ord 'a' i al=[chr(ord('a') + i) for i in range(26)] al [chr(ord('a') + i) for i in range(26)] direction=[[1,0],[0,1],[-1,0],[0,-1]] direction [[1,0],[0,1],[-1,0],[0,-1]] [1,0] 1 0 [0,1] 0 1 [-1,0] -1 0 [0,-1] 0 -1 n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m int(input()) for i in range(m) for i in range(m) i range(m) range m for i in range(m) int(input()) int input() input a=[int(input()) for i in range(m)] a [int(input()) for i in range(m)] dic={} dic {} for i in range(m):
    dic[a[i]]=1 i range(m) range m dic[a[i]]=1 dic[a[i]] dic a[i] a i 1 dp=[0]*(n+2) dp [0]*(n+2) [0] 0 n+2 n 2 dp[0]=1 dp[0] dp 0 1 for i in range(n):
    if i in dic:
        continue
    dp[i+1]+=dp[i]
    dp[i+2]+=dp[i]
    dp[i+1]%=mod
    dp[i+2]%=mod i range(n) range n if i in dic:
        continue
     i in dic i dic continue dp[i+1]+=dp[i] dp[i+1] dp i+1 i 1 dp[i] dp i dp[i+2]+=dp[i] dp[i+2] dp i+2 i 2 dp[i] dp i dp[i+1]%=mod dp[i+1] dp i+1 i 1 mod dp[i+2]%=mod dp[i+2] dp i+2 i 2 mod print(dp[-2]) print dp[-2] dp -2 dp=[0]*(n+2) [0]*(n+2) dp def input():
    return sys.stdin.readline()[:-1] def input():
    return sys.stdin.readline()[:-1] input def ruiseki(lst):
    return [0]+list(accumulate(lst)) def ruiseki(lst):
    return [0]+list(accumulate(lst)) ruiseki direction=[[1,0],[0,1],[-1,0],[0,-1]] [[1,0],[0,1],[-1,0],[0,-1]] direction mod=pow(10,9)+7 pow(10,9)+7 mod n,m=map(int,input().split()) map(int,input().split()) n dic={} {} dic m=map(int,input().split()) map(int,input().split()) m a=[int(input()) for i in range(m)] [int(input()) for i in range(m)] a def celi(a,b):
    return -(-a//b) def celi(a,b):
    return -(-a//b) celi al=[chr(ord('a') + i) for i in range(26)] [chr(ord('a') + i) for i in range(26)] al
import bisect, copy, heapq, math
from math import inf
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n,m=map(int,input().split())
a=[int(input()) for i in range(m)]

dic={}
for i in range(m):
    dic[a[i]]=1
dp=[0]*(n+2)

dp[0]=1
for i in range(n):
    if i in dic:
        continue
    dp[i+1]+=dp[i]
    dp[i+2]+=dp[i]
    dp[i+1]%=mod
    dp[i+2]%=mod
print(dp[-2])