import sys

N, K = map(int, input().split())
broken = []
for _ in range(K):
    broken.append(int(input()))

for k in range(K-1):
    if broken[k] +1 == broken[k+1]:
        print(0)
        sys.exit(0)
broken_set = set(broken)

# N段連続したら何通りあるか表を作る
P = {0: 1, 1: 1, 2: 2}
for i in range(3, N+1):
    P[i] = P[i-1] + P[i-2]

total = 1
low = 0
for i in range(1, N+1):
    if i in broken_set:
        seq = (i - 1) - low
        total *= P[seq]
        total %= 1000000007
        low = i + 1
else:
    seq = N - low
    total *= P[seq]
    total %= 1000000007

print(total) import sys sys N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K broken = [] broken [] for _ in range(K):
    broken.append(int(input())) _ range(K) range K broken.append(int(input())) broken.append broken append int(input()) int input() input for k in range(K-1):
    if broken[k] +1 == broken[k+1]:
        print(0)
        sys.exit(0) k range(K-1) range K-1 K 1 if broken[k] +1 == broken[k+1]:
        print(0)
        sys.exit(0) broken[k] +1 == broken[k+1] broken[k] +1 broken[k] broken k 1 broken[k+1] broken k+1 k 1 print(0) print 0 sys.exit(0) sys.exit sys exit 0 broken_set = set(broken) broken_set set(broken) set broken P = {0: 1, 1: 1, 2: 2} P {0: 1, 1: 1, 2: 2} 0 0 1 1 1 1 2 2 2 for i in range(3, N+1):
    P[i] = P[i-1] + P[i-2] i range(3, N+1) range 3 N+1 N 1 P[i] = P[i-1] + P[i-2] P[i] P i P[i-1] + P[i-2] P[i-1] P i-1 i 1 P[i-2] P i-2 i 2 total = 1 total 1 low = 0 low 0 for i in range(1, N+1):
    if i in broken_set:
        seq = (i - 1) - low
        total *= P[seq]
        total %= 1000000007
        low = i + 1
else:
    seq = N - low
    total *= P[seq]
    total %= 1000000007 i range(1, N+1) range 1 N+1 N 1 if i in broken_set:
        seq = (i - 1) - low
        total *= P[seq]
        total %= 1000000007
        low = i + 1 i in broken_set i broken_set seq = (i - 1) - low seq (i - 1) - low i - 1 i 1 low total *= P[seq] total P[seq] P seq total %= 1000000007 total 1000000007 low = i + 1 low i + 1 i 1 seq = N - low seq N - low N low total *= P[seq] total P[seq] P seq total %= 1000000007 total 1000000007 print(total) print total P = {0: 1, 1: 1, 2: 2} {0: 1, 1: 1, 2: 2} P total %= 1000000007 1000000007 total N, K = map(int, input().split()) map(int, input().split()) N low = 0 0 low seq = (i - 1) - low (i - 1) - low seq K = map(int, input().split()) map(int, input().split()) K low = i + 1 i + 1 low broken = [] [] broken total *= P[seq] P[seq] total broken_set = set(broken) set(broken) broken_set total %= 1000000007 1000000007 total total = 1 1 total total *= P[seq] P[seq] total seq = N - low N - low seq
import sys

N, K = map(int, input().split())
broken = []
for _ in range(K):
    broken.append(int(input()))

for k in range(K-1):
    if broken[k] +1 == broken[k+1]:
        print(0)
        sys.exit(0)
broken_set = set(broken)

# N段連続したら何通りあるか表を作る
P = {0: 1, 1: 1, 2: 2}
for i in range(3, N+1):
    P[i] = P[i-1] + P[i-2]

total = 1
low = 0
for i in range(1, N+1):
    if i in broken_set:
        seq = (i - 1) - low
        total *= P[seq]
        total %= 1000000007
        low = i + 1
else:
    seq = N - low
    total *= P[seq]
    total %= 1000000007

print(total)
