from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n, m = MAP()
k = [0]*(n+1)
for i in range(m):
    a = INT()
    k[a] = -1

for i in range(n+1):
    if k[i] == -1:
        continue
    elif i <= 1:
        k[i] = 1
    else:
        k[i] = ( (k[i-1] if k[i-1] != -1 else 0) + (k[i-2] if k[i-2] != -1 else 0) ) % (10**9+7)

print(k[n]%(10**9+7)) from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf from itertools import accumulate,permutations,combinations,product,combinations_with_replacement from collections import deque,defaultdict,Counter from bisect import bisect_left,bisect_right from operator import itemgetter from heapq import heapify,heappop,heappush from queue import Queue,LifoQueue,PriorityQueue from copy import deepcopy from time import time import string string import sys sys sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 def input() : return sys.stdin.readline().strip() input def INT()   : return int(input()) INT def MAP()   : return map(int,input().split()) MAP def LIST()  : return list(MAP()) LIST n, m = MAP() n MAP() MAP m k = [0]*(n+1) k [0]*(n+1) [0] 0 n+1 n 1 for i in range(m):
    a = INT()
    k[a] = -1 i range(m) range m a = INT() a INT() INT k[a] = -1 k[a] k a -1 for i in range(n+1):
    if k[i] == -1:
        continue
    elif i <= 1:
        k[i] = 1
    else:
        k[i] = ( (k[i-1] if k[i-1] != -1 else 0) + (k[i-2] if k[i-2] != -1 else 0) ) % (10**9+7) i range(n+1) range n+1 n 1 if k[i] == -1:
        continue
    elif i <= 1:
        k[i] = 1
    else:
        k[i] = ( (k[i-1] if k[i-1] != -1 else 0) + (k[i-2] if k[i-2] != -1 else 0) ) % (10**9+7) k[i] == -1 k[i] k i -1 continue elif i <= 1:
        k[i] = 1
     i <= 1 i 1 k[i] = 1 k[i] k i 1 k[i] = ( (k[i-1] if k[i-1] != -1 else 0) + (k[i-2] if k[i-2] != -1 else 0) ) % (10**9+7) k[i] k i ( (k[i-1] if k[i-1] != -1 else 0) + (k[i-2] if k[i-2] != -1 else 0) ) % (10**9+7) (k[i-1] if k[i-1] != -1 else 0) + (k[i-2] if k[i-2] != -1 else 0) k[i-1] if k[i-1] != -1 else 0 k[i-1] != -1 k[i-1] k i-1 i 1 -1 k[i-1] k i-1 i 1 0 k[i-2] if k[i-2] != -1 else 0 k[i-2] != -1 k[i-2] k i-2 i 2 -1 k[i-2] k i-2 i 2 0 10**9+7 10**9 10 9 7 print(k[n]%(10**9+7)) print k[n]%(10**9+7) k[n] k n 10**9+7 10**9 10 9 7 def LIST()  : return list(MAP()) def LIST()  : return list(MAP()) LIST def input() : return sys.stdin.readline().strip() def input() : return sys.stdin.readline().strip() input def INT()   : return int(input()) def INT()   : return int(input()) INT k = [0]*(n+1) [0]*(n+1) k def MAP()   : return map(int,input().split()) def MAP()   : return map(int,input().split()) MAP m = MAP() MAP() m a = INT() INT() a n, m = MAP() MAP() n
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n, m = MAP()
k = [0]*(n+1)
for i in range(m):
    a = INT()
    k[a] = -1

for i in range(n+1):
    if k[i] == -1:
        continue
    elif i <= 1:
        k[i] = 1
    else:
        k[i] = ( (k[i-1] if k[i-1] != -1 else 0) + (k[i-2] if k[i-2] != -1 else 0) ) % (10**9+7)

print(k[n]%(10**9+7))