import sys

sys.setrecursionlimit(100000)



def intinput(): return list(map(int,sys.stdin.readline().split()))



fib={0:0,1:1,2:1}

for i in range(3,100003):

    fib[i]=fib[i-1]+fib[i-2]

  #  fib.append(fib[i-1]+fib[i-2])



n,m=intinput()

mod=10**9+7

a=[int(sys.stdin.readline()) for _ in range(m)]

if m!=0:

    l=[a[0]]

    for i in range(len(a)-1):

        l.append(a[i+1]-a[i]-1)

    l.append(n-a[-1])

    k=1

    for i in l:

        k=fib[i]*k%mod

    print((k%mod))

else:

    print((fib[n+1]%mod))
import sys

sys.setrecursionlimit(100000)



def intinput(): return list(map(int,sys.stdin.readline().split()))





n, m = intinput()

a = {int(sys.stdin.readline()) for _ in range(m)}

memo = [0 for x in range(n + 4)]

memo[0] = 1

mod = 10 ** 9 + 7

for i in range(n):

    if i + 1 not in a:

        memo[i + 1] = (memo[i + 1] + memo[i]) % mod

    if i + 2 not in a:

        memo[i + 2] = (memo[i + 2] + memo[i]) % mod

print((memo[n]))
import sys

sys.setrecursionlimit(100000)


def intinput():
    return list(map(int, sys.stdin.readline().split()))


fib = {0: 0, 1: 1, 2: 1}
for i in range(3, 100003):
    fib[i] = fib[i - 1] + fib[i - 2]
#  fib.append(fib[i-1]+fib[i-2])
n, m = intinput()
mod = 10**9 + 7
a = [int(sys.stdin.readline()) for _ in range(m)]
if m != 0:
    l = [a[0]]
    for i in range(len(a) - 1):
        l.append(a[i + 1] - a[i] - 1)
    l.append(n - a[-1])
    k = 1
    for i in l:
        k = fib[i] * k % mod
    print((k % mod))
else:
    print((fib[n + 1] % mod))

import sys

sys.setrecursionlimit(100000)


def intinput():
    return list(map(int, sys.stdin.readline().split()))


n, m = intinput()
a = {int(sys.stdin.readline()) for _ in range(m)}
memo = [0 for x in range(n + 4)]
memo[0] = 1
mod = 10**9 + 7
for i in range(n):
    if i + 1 not in a:
        memo[i + 1] = (memo[i + 1] + memo[i]) % mod
    if i + 2 not in a:
        memo[i + 2] = (memo[i + 2] + memo[i]) % mod
print((memo[n]))

-fib = {0: 0, 1: 1, 2: 1} -for i in range(3, 100003): -    fib[i] = fib[i - 1] + fib[i - 2] -#  fib.append(fib[i-1]+fib[i-2]) +a = {int(sys.stdin.readline()) for _ in range(m)} +memo = [0 for x in range(n + 4)] +memo[0] = 1 -a = [int(sys.stdin.readline()) for _ in range(m)] -if m != 0: -    l = [a[0]] -    for i in range(len(a) - 1): -        l.append(a[i + 1] - a[i] - 1) -    l.append(n - a[-1]) -    k = 1 -    for i in l: -        k = fib[i] * k % mod -    print((k % mod)) -else: -    print((fib[n + 1] % mod)) +for i in range(n): +    if i + 1 not in a: +        memo[i + 1] = (memo[i + 1] + memo[i]) % mod +    if i + 2 not in a: +        memo[i + 2] = (memo[i + 2] + memo[i]) % mod +print((memo[n]))