import sys
from functools import lru_cache
sys.setrecursionlimit(10**9)
MOD=10**9+7
n,m=map(int,input().split())
a=set([int(input()) for _ in range(m)])
if 1 in a:
  ans=[1,0]
else:
  ans=[1,1]

@lru_cache(maxsize=None)
def cnt(x):
  if x<2:
    return ans[x]
  if x in a:
    return 0
  else:
    return (cnt(x-1)+cnt(x-2))%MOD

print(cnt(n)) import sys sys from functools import lru_cache sys.setrecursionlimit(10**9) sys.setrecursionlimit sys setrecursionlimit 10**9 10 9 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 int(input()) for _ in range(m) for _ in range(m) _ range(m) range m for _ in range(m) int(input()) int input() input a=set([int(input()) for _ in range(m)]) a set([int(input()) for _ in range(m)]) set [int(input()) for _ in range(m)] if 1 in a:
  ans=[1,0]
else:
  ans=[1,1] 1 in a 1 a ans=[1,0] ans [1,0] 1 0 ans=[1,1] ans [1,1] 1 1 def cnt(x):
  if x<2:
    return ans[x]
  if x in a:
    return 0
  else:
    return (cnt(x-1)+cnt(x-2))%MOD cnt if x<2:
    return ans[x]
   x<2 x 2 return ans[x] ans[x] ans x if x in a:
    return 0
  else:
    return (cnt(x-1)+cnt(x-2))%MOD x in a x a return 0 0 return (cnt(x-1)+cnt(x-2))%MOD (cnt(x-1)+cnt(x-2))%MOD cnt(x-1)+cnt(x-2) cnt(x-1) cnt x-1 x 1 cnt(x-2) cnt x-2 x 2 MOD x x @lru_cache(maxsize=None) cnt maxsize=None @lru_cache(maxsize=None) lru_cache maxsize=None maxsize None cnt print(cnt(n)) print cnt(n) cnt n ans=[1,1] [1,1] ans a=set([int(input()) for _ in range(m)]) set([int(input()) for _ in range(m)]) a n,m=map(int,input().split()) map(int,input().split()) n ans=[1,0] [1,0] ans MOD=10**9+7 10**9+7 MOD m=map(int,input().split()) map(int,input().split()) m def cnt(x):
  if x<2:
    return ans[x]
  if x in a:
    return 0
  else:
    return (cnt(x-1)+cnt(x-2))%MOD def cnt(x):
  if x<2:
    return ans[x]
  if x in a:
    return 0
  else:
    return (cnt(x-1)+cnt(x-2))%MOD cnt
import sys
from functools import lru_cache
sys.setrecursionlimit(10**9)
MOD=10**9+7
n,m=map(int,input().split())
a=set([int(input()) for _ in range(m)])
if 1 in a:
  ans=[1,0]
else:
  ans=[1,1]

@lru_cache(maxsize=None)
def cnt(x):
  if x<2:
    return ans[x]
  if x in a:
    return 0
  else:
    return (cnt(x-1)+cnt(x-2))%MOD

print(cnt(n))