import sys
mod=10**9+7 ; inf=float("inf")
from math import sqrt, ceil
from collections import deque, Counter, defaultdict #すべてのkeyが用意されてる defaultdict(int)で初期化
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)
from decimal import ROUND_HALF_UP,Decimal  #変換後の末尾桁を0や0.01で指定
  #Decimal((str(0.5)).quantize(Decimal('0'), rounding=ROUND_HALF_UP))
from functools import lru_cache
from bisect import bisect_left as bileft, bisect_right as biright
#メモ化再帰defの冒頭に毎回 @lru_cache(maxsize=10**10)
#引数にlistはだめ
#######ここまでテンプレ#######
#ソート、"a"+"b"、再帰ならPython3の方がいい
#######ここから天ぷら########
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]
NG=[0]*(10**5+10)
for i in A:
    NG[i]=1


@lru_cache(maxsize=10**10)
def qwe(x):
    if x==n:return 1
    if x>n:return 0
    if NG[x+1] and NG[x+2]: print(0);exit()
    if NG[x+1]:return qwe(x+2)%mod
    if NG[x+2]:return qwe(x+1)%mod
    return (qwe(x+2)+qwe(x+1))%mod
print(qwe(0))
     import sys sys mod=10**9+7 mod 10**9+7 10**9 10 9 7 inf=float("inf") inf float("inf") float "inf" from math import sqrt, ceil from collections import deque, Counter, defaultdict input=lambda: sys.stdin.readline().strip() input lambda: sys.stdin.readline().strip() sys.stdin.readline().strip() sys.stdin.readline().strip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline strip sys.setrecursionlimit(11451419) sys.setrecursionlimit sys setrecursionlimit 11451419 from decimal import ROUND_HALF_UP,Decimal from functools import lru_cache from bisect import bisect_left as bileft, bisect_right as biright 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)] NG=[0]*(10**5+10) NG [0]*(10**5+10) [0] 0 10**5+10 10**5 10 5 10 for i in A:
    NG[i]=1 i A NG[i]=1 NG[i] NG i 1 def qwe(x):
    if x==n:return 1
    if x>n:return 0
    if NG[x+1] and NG[x+2]: print(0);exit()
    if NG[x+1]:return qwe(x+2)%mod
    if NG[x+2]:return qwe(x+1)%mod
    return (qwe(x+2)+qwe(x+1))%mod qwe if x==n:return 1
     x==n x n if x>n:return 0
     x>n x n if NG[x+1] and NG[x+2]: print(0);exit()
     NG[x+1] and NG[x+2] NG[x+1] NG x+1 x 1 NG[x+2] NG x+2 x 2 if NG[x+1]:return qwe(x+2)%mod
     NG[x+1] NG x+1 x 1 if NG[x+2]:return qwe(x+1)%mod
     NG[x+2] NG x+2 x 2 return (qwe(x+2)+qwe(x+1))%mod (qwe(x+2)+qwe(x+1))%mod qwe(x+2)+qwe(x+1) qwe(x+2) qwe x+2 x 2 qwe(x+1) qwe x+1 x 1 mod x x @lru_cache(maxsize=10**10) qwe maxsize=10**10 @lru_cache(maxsize=10**10) lru_cache maxsize=10**10 maxsize 10**10 10 10 qwe print(qwe(0)) print qwe(0) qwe 0 def qwe(x):
    if x==n:return 1
    if x>n:return 0
    if NG[x+1] and NG[x+2]: print(0);exit()
    if NG[x+1]:return qwe(x+2)%mod
    if NG[x+2]:return qwe(x+1)%mod
    return (qwe(x+2)+qwe(x+1))%mod def qwe(x):
    if x==n:return 1
    if x>n:return 0
    if NG[x+1] and NG[x+2]: print(0);exit()
    if NG[x+1]:return qwe(x+2)%mod
    if NG[x+2]:return qwe(x+1)%mod
    return (qwe(x+2)+qwe(x+1))%mod qwe mod=10**9+7 10**9+7 mod inf=float("inf") float("inf") inf n,m=map(int,input().split()) map(int,input().split()) n A=[int(input()) for i in range(m)] [int(input()) for i in range(m)] A input=lambda: sys.stdin.readline().strip() lambda: sys.stdin.readline().strip() input m=map(int,input().split()) map(int,input().split()) m NG=[0]*(10**5+10) [0]*(10**5+10) NG
import sys
mod=10**9+7 ; inf=float("inf")
from math import sqrt, ceil
from collections import deque, Counter, defaultdict #すべてのkeyが用意されてる defaultdict(int)で初期化
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)
from decimal import ROUND_HALF_UP,Decimal  #変換後の末尾桁を0や0.01で指定
  #Decimal((str(0.5)).quantize(Decimal('0'), rounding=ROUND_HALF_UP))
from functools import lru_cache
from bisect import bisect_left as bileft, bisect_right as biright
#メモ化再帰defの冒頭に毎回 @lru_cache(maxsize=10**10)
#引数にlistはだめ
#######ここまでテンプレ#######
#ソート、"a"+"b"、再帰ならPython3の方がいい
#######ここから天ぷら########
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]
NG=[0]*(10**5+10)
for i in A:
    NG[i]=1


@lru_cache(maxsize=10**10)
def qwe(x):
    if x==n:return 1
    if x>n:return 0
    if NG[x+1] and NG[x+2]: print(0);exit()
    if NG[x+1]:return qwe(x+2)%mod
    if NG[x+2]:return qwe(x+1)%mod
    return (qwe(x+2)+qwe(x+1))%mod
print(qwe(0))
    
