
def solve():
    dp = [0] * (N+1)
    dp[0] = 1
    for i in range(N):
        for j in range(i+1, min(N,i+2)+1):
            if broken[j]:
                dp[j] += dp[i]
                dp[j] %=  1000000007
    print(dp[-1])

if __name__ == "__main__":
    N,M = list(map(int, input().split()))
    broken = [True] * (N+1)
    for i in range(M):
        a = int(input())
        broken[a] = False
    solve()   def solve():
    dp = [0] * (N+1)
    dp[0] = 1
    for i in range(N):
        for j in range(i+1, min(N,i+2)+1):
            if broken[j]:
                dp[j] += dp[i]
                dp[j] %=  1000000007
    print(dp[-1]) solve dp = [0] * (N+1) dp [0] * (N+1) [0] 0 N+1 N 1 dp[0] = 1 dp[0] dp 0 1 for i in range(N):
        for j in range(i+1, min(N,i+2)+1):
            if broken[j]:
                dp[j] += dp[i]
                dp[j] %=  1000000007
     i range(N) range N for j in range(i+1, min(N,i+2)+1):
            if broken[j]:
                dp[j] += dp[i]
                dp[j] %=  1000000007
     j range(i+1, min(N,i+2)+1) range i+1 i 1 min(N,i+2)+1 min(N,i+2) min N i+2 i 2 1 if broken[j]:
                dp[j] += dp[i]
                dp[j] %=  1000000007
     broken[j] broken j dp[j] += dp[i] dp[j] dp j dp[i] dp i dp[j] %=  1000000007 dp[j] dp j 1000000007 print(dp[-1]) print dp[-1] dp -1 if __name__ == "__main__":
    N,M = list(map(int, input().split()))
    broken = [True] * (N+1)
    for i in range(M):
        a = int(input())
        broken[a] = False
    solve()   __name__ == "__main__" __name__ "__main__" N,M = list(map(int, input().split())) N list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split M broken = [True] * (N+1) broken [True] * (N+1) [True] True N+1 N 1 for i in range(M):
        a = int(input())
        broken[a] = False
     i range(M) range M a = int(input()) a int(input()) int input() input broken[a] = False broken[a] broken a False solve() solve M = list(map(int, input().split())) list(map(int, input().split())) M broken = [True] * (N+1) [True] * (N+1) broken N,M = list(map(int, input().split())) list(map(int, input().split())) N a = int(input()) int(input()) a def solve():
    dp = [0] * (N+1)
    dp[0] = 1
    for i in range(N):
        for j in range(i+1, min(N,i+2)+1):
            if broken[j]:
                dp[j] += dp[i]
                dp[j] %=  1000000007
    print(dp[-1]) def solve():
    dp = [0] * (N+1)
    dp[0] = 1
    for i in range(N):
        for j in range(i+1, min(N,i+2)+1):
            if broken[j]:
                dp[j] += dp[i]
                dp[j] %=  1000000007
    print(dp[-1]) solve

def solve():
    dp = [0] * (N+1)
    dp[0] = 1
    for i in range(N):
        for j in range(i+1, min(N,i+2)+1):
            if broken[j]:
                dp[j] += dp[i]
                dp[j] %=  1000000007
    print(dp[-1])

if __name__ == "__main__":
    N,M = list(map(int, input().split()))
    broken = [True] * (N+1)
    for i in range(M):
        a = int(input())
        broken[a] = False
    solve()  
