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 = set(map(int, read().split()))
 
dp = [0] * (n + 1)
dp[0] = 1
if 1 not in a:
    dp[1] = 1
cnt = 0
for i in range(2, n + 1):
    if i not in a:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
        cnt = 0
    else:
        cnt += 1
        if cnt == 2:
            print('0')
            exit()
print(dp[n]) 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 = set(map(int, read().split())) a set(map(int, read().split())) set 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 dp[0] = 1 dp[0] dp 0 1 if 1 not in a:
    dp[1] = 1 1 not in a 1 a dp[1] = 1 dp[1] dp 1 1 cnt = 0 cnt 0 for i in range(2, n + 1):
    if i not in a:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
        cnt = 0
    else:
        cnt += 1
        if cnt == 2:
            print('0')
            exit() i range(2, n + 1) range 2 n + 1 n 1 if i not in a:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
        cnt = 0
    else:
        cnt += 1
        if cnt == 2:
            print('0')
            exit() i not in a i a dp[i] = (dp[i - 1] + dp[i - 2]) % MOD dp[i] dp i (dp[i - 1] + dp[i - 2]) % MOD dp[i - 1] + dp[i - 2] dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 MOD cnt = 0 cnt 0 cnt += 1 cnt 1 if cnt == 2:
            print('0')
            exit() cnt == 2 cnt 2 print('0') print '0' exit() exit print(dp[n]) print dp[n] dp n read = sys.stdin.buffer.read sys.stdin.buffer.read read MOD = 10**9+7 10**9+7 MOD dp = [0] * (n + 1) [0] * (n + 1) dp readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines n, m = map(int, readline().split()) map(int, readline().split()) n m = map(int, readline().split()) map(int, readline().split()) m readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline cnt += 1 1 cnt a = set(map(int, read().split())) set(map(int, read().split())) a cnt = 0 0 cnt cnt = 0 0 cnt
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 = set(map(int, read().split()))
 
dp = [0] * (n + 1)
dp[0] = 1
if 1 not in a:
    dp[1] = 1
cnt = 0
for i in range(2, n + 1):
    if i not in a:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
        cnt = 0
    else:
        cnt += 1
        if cnt == 2:
            print('0')
            exit()
print(dp[n])