import sys
sys.setrecursionlimit(200010)

n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
b = [0]*(n+1)
dp = [-1]*(n+1)
for e in a:
    b[e] = 1
dp[0] = 1


def solve(k):
    if(b[k] == 1):
        return 0
    if(dp[k] != -1):
        return dp[k]
    if(k < 0):
        return 0
    tmp = solve(k-1)+solve(k-2)
    dp[k] = tmp % 1000000007
    return tmp


print(solve(n) % (1000000007)) import sys sys sys.setrecursionlimit(200010) sys.setrecursionlimit sys setrecursionlimit 200010 n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m int(input()) for i in range(m) for i in range(m) i range(m) range m for i in range(m) int(input()) int input() input a = [int(input()) for i in range(m)] a [int(input()) for i in range(m)] b = [0]*(n+1) b [0]*(n+1) [0] 0 n+1 n 1 dp = [-1]*(n+1) dp [-1]*(n+1) [-1] -1 n+1 n 1 for e in a:
    b[e] = 1 e a b[e] = 1 b[e] b e 1 dp[0] = 1 dp[0] dp 0 1 def solve(k):
    if(b[k] == 1):
        return 0
    if(dp[k] != -1):
        return dp[k]
    if(k < 0):
        return 0
    tmp = solve(k-1)+solve(k-2)
    dp[k] = tmp % 1000000007
    return tmp solve if(b[k] == 1):
        return 0
     b[k] == 1 b[k] b k 1 return 0 0 if(dp[k] != -1):
        return dp[k]
     dp[k] != -1 dp[k] dp k -1 return dp[k] dp[k] dp k if(k < 0):
        return 0
     k < 0 k 0 return 0 0 tmp = solve(k-1)+solve(k-2) tmp solve(k-1)+solve(k-2) solve(k-1) solve k-1 k 1 solve(k-2) solve k-2 k 2 dp[k] = tmp % 1000000007 dp[k] dp k tmp % 1000000007 tmp 1000000007 return tmp tmp k k print(solve(n) % (1000000007)) print solve(n) % (1000000007) solve(n) solve n 1000000007 a = [int(input()) for i in range(m)] [int(input()) for i in range(m)] a n, m = map(int, input().split()) map(int, input().split()) n b = [0]*(n+1) [0]*(n+1) b dp = [-1]*(n+1) [-1]*(n+1) dp def solve(k):
    if(b[k] == 1):
        return 0
    if(dp[k] != -1):
        return dp[k]
    if(k < 0):
        return 0
    tmp = solve(k-1)+solve(k-2)
    dp[k] = tmp % 1000000007
    return tmp def solve(k):
    if(b[k] == 1):
        return 0
    if(dp[k] != -1):
        return dp[k]
    if(k < 0):
        return 0
    tmp = solve(k-1)+solve(k-2)
    dp[k] = tmp % 1000000007
    return tmp solve m = map(int, input().split()) map(int, input().split()) m
import sys
sys.setrecursionlimit(200010)

n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
b = [0]*(n+1)
dp = [-1]*(n+1)
for e in a:
    b[e] = 1
dp[0] = 1


def solve(k):
    if(b[k] == 1):
        return 0
    if(dp[k] != -1):
        return dp[k]
    if(k < 0):
        return 0
    tmp = solve(k-1)+solve(k-2)
    dp[k] = tmp % 1000000007
    return tmp


print(solve(n) % (1000000007))
