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)
ok = [1] * (n + 1)

for i in a:
    ok[i] = 0

dp[0] = 1
dp[1] = 1 * ok[1]

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

for i in a:
    ok[i] = 0

dp[0] = 1
dp[1] = 1 * ok[1]

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

print(dp[-1])