import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
MOD = 10**9+7

n, m = map(int, readline().split())
a = list(map(int, read().split()))

dp = [0] * (n + 1)
ng = [0] * (n + 1)

for i in a:
    ng[i] = 1

dp[0] = 1
if ng[1] != 1:
    dp[1] = 1

for i in range(2, n + 1):
    if ng[i - 1] == 1 and ng[i - 2] == 1:
        print(0)
        exit()
    elif ng[i - 1] == 1:
        dp[i] = dp[i - 2]
    elif ng[i - 2] == 1:
        dp[i] = dp[i - 1]
    else:
        dp[i] = dp[i - 1] + dp[i - 2]
    if dp[i] > MOD:
        dp[i] %= MOD

print(dp[-1]) import sys sys read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines MOD = 10**9+7 MOD 10**9+7 10**9 10 9 7 n, m = map(int, readline().split()) n map(int, readline().split()) map int readline().split() ().split () readline split m a = list(map(int, read().split())) a list(map(int, read().split())) list map(int, read().split()) map int read().split() ().split () read split dp = [0] * (n + 1) dp [0] * (n + 1) [0] 0 n + 1 n 1 ng = [0] * (n + 1) ng [0] * (n + 1) [0] 0 n + 1 n 1 for i in a:
    ng[i] = 1 i a ng[i] = 1 ng[i] ng i 1 dp[0] = 1 dp[0] dp 0 1 if ng[1] != 1:
    dp[1] = 1 ng[1] != 1 ng[1] ng 1 1 dp[1] = 1 dp[1] dp 1 1 for i in range(2, n + 1):
    if ng[i - 1] == 1 and ng[i - 2] == 1:
        print(0)
        exit()
    elif ng[i - 1] == 1:
        dp[i] = dp[i - 2]
    elif ng[i - 2] == 1:
        dp[i] = dp[i - 1]
    else:
        dp[i] = dp[i - 1] + dp[i - 2]
    if dp[i] > MOD:
        dp[i] %= MOD i range(2, n + 1) range 2 n + 1 n 1 if ng[i - 1] == 1 and ng[i - 2] == 1:
        print(0)
        exit()
    elif ng[i - 1] == 1:
        dp[i] = dp[i - 2]
    elif ng[i - 2] == 1:
        dp[i] = dp[i - 1]
    else:
        dp[i] = dp[i - 1] + dp[i - 2]
     ng[i - 1] == 1 and ng[i - 2] == 1 ng[i - 1] == 1 ng[i - 1] ng i - 1 i 1 1 ng[i - 2] == 1 ng[i - 2] ng i - 2 i 2 1 print(0) print 0 exit() exit elif ng[i - 1] == 1:
        dp[i] = dp[i - 2]
     ng[i - 1] == 1 ng[i - 1] ng i - 1 i 1 1 dp[i] = dp[i - 2] dp[i] dp i dp[i - 2] dp i - 2 i 2 elif ng[i - 2] == 1:
        dp[i] = dp[i - 1]
     ng[i - 2] == 1 ng[i - 2] ng i - 2 i 2 1 dp[i] = dp[i - 1] dp[i] dp i dp[i - 1] dp i - 1 i 1 dp[i] = dp[i - 1] + dp[i - 2] dp[i] dp i dp[i - 1] + dp[i - 2] dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 if dp[i] > MOD:
        dp[i] %= MOD dp[i] > MOD dp[i] dp i MOD dp[i] %= MOD dp[i] dp i MOD print(dp[-1]) print dp[-1] dp -1 n, m = map(int, readline().split()) map(int, readline().split()) n read = sys.stdin.buffer.read sys.stdin.buffer.read read MOD = 10**9+7 10**9+7 MOD readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline dp = [0] * (n + 1) [0] * (n + 1) dp ng = [0] * (n + 1) [0] * (n + 1) ng m = map(int, readline().split()) map(int, readline().split()) m readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines a = list(map(int, read().split())) list(map(int, read().split())) a
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
MOD = 10**9+7

n, m = map(int, readline().split())
a = list(map(int, read().split()))

dp = [0] * (n + 1)
ng = [0] * (n + 1)

for i in a:
    ng[i] = 1

dp[0] = 1
if ng[1] != 1:
    dp[1] = 1

for i in range(2, n + 1):
    if ng[i - 1] == 1 and ng[i - 2] == 1:
        print(0)
        exit()
    elif ng[i - 1] == 1:
        dp[i] = dp[i - 2]
    elif ng[i - 2] == 1:
        dp[i] = dp[i - 1]
    else:
        dp[i] = dp[i - 1] + dp[i - 2]
    if dp[i] > MOD:
        dp[i] %= MOD

print(dp[-1])