def main():
    n,m = map(int,input().split())
    dp = [0 for i in range(n+1)]
    mod = 10**9+7
    for i in range(m):
        a = int(input())
        dp[a] = -1
    dp[0] = 1
    if dp[1]!=-1:
        dp[1] = 1
    for i in range(2,n+1):
        if dp[i]==-1:
            continue
        if dp[i-1]!=-1 and dp[i-2]!=-1:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] = dp[i]%mod
        elif dp[i-1]!=-1 and dp[i-2]==-1:
            dp[i] = dp[i-1]
        elif dp[i-1]==-1 and dp[i-2]!=-1:
            dp[i] = dp[i-2]
        else:
            dp[i] = 0
    print(dp[-1])

if __name__ == "__main__":
    main() def main():
    n,m = map(int,input().split())
    dp = [0 for i in range(n+1)]
    mod = 10**9+7
    for i in range(m):
        a = int(input())
        dp[a] = -1
    dp[0] = 1
    if dp[1]!=-1:
        dp[1] = 1
    for i in range(2,n+1):
        if dp[i]==-1:
            continue
        if dp[i-1]!=-1 and dp[i-2]!=-1:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] = dp[i]%mod
        elif dp[i-1]!=-1 and dp[i-2]==-1:
            dp[i] = dp[i-1]
        elif dp[i-1]==-1 and dp[i-2]!=-1:
            dp[i] = dp[i-2]
        else:
            dp[i] = 0
    print(dp[-1]) main n,m = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m 0 for i in range(n+1) for i in range(n+1) i range(n+1) range n+1 n 1 for i in range(n+1) 0 dp = [0 for i in range(n+1)] dp [0 for i in range(n+1)] mod = 10**9+7 mod 10**9+7 10**9 10 9 7 for i in range(m):
        a = int(input())
        dp[a] = -1
     i range(m) range m a = int(input()) a int(input()) int input() input dp[a] = -1 dp[a] dp a -1 dp[0] = 1 dp[0] dp 0 1 if dp[1]!=-1:
        dp[1] = 1
     dp[1]!=-1 dp[1] dp 1 -1 dp[1] = 1 dp[1] dp 1 1 for i in range(2,n+1):
        if dp[i]==-1:
            continue
        if dp[i-1]!=-1 and dp[i-2]!=-1:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] = dp[i]%mod
        elif dp[i-1]!=-1 and dp[i-2]==-1:
            dp[i] = dp[i-1]
        elif dp[i-1]==-1 and dp[i-2]!=-1:
            dp[i] = dp[i-2]
        else:
            dp[i] = 0
     i range(2,n+1) range 2 n+1 n 1 if dp[i]==-1:
            continue
         dp[i]==-1 dp[i] dp i -1 continue if dp[i-1]!=-1 and dp[i-2]!=-1:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] = dp[i]%mod
        elif dp[i-1]!=-1 and dp[i-2]==-1:
            dp[i] = dp[i-1]
        elif dp[i-1]==-1 and dp[i-2]!=-1:
            dp[i] = dp[i-2]
        else:
            dp[i] = 0
     dp[i-1]!=-1 and dp[i-2]!=-1 dp[i-1]!=-1 dp[i-1] dp i-1 i 1 -1 dp[i-2]!=-1 dp[i-2] dp i-2 i 2 -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 dp[i] = dp[i]%mod dp[i] dp i dp[i]%mod dp[i] dp i mod elif dp[i-1]!=-1 and dp[i-2]==-1:
            dp[i] = dp[i-1]
         dp[i-1]!=-1 and dp[i-2]==-1 dp[i-1]!=-1 dp[i-1] dp i-1 i 1 -1 dp[i-2]==-1 dp[i-2] dp i-2 i 2 -1 dp[i] = dp[i-1] dp[i] dp i dp[i-1] dp i-1 i 1 elif dp[i-1]==-1 and dp[i-2]!=-1:
            dp[i] = dp[i-2]
         dp[i-1]==-1 and dp[i-2]!=-1 dp[i-1]==-1 dp[i-1] dp i-1 i 1 -1 dp[i-2]!=-1 dp[i-2] dp i-2 i 2 -1 dp[i] = dp[i-2] dp[i] dp i dp[i-2] dp i-2 i 2 dp[i] = 0 dp[i] dp i 0 print(dp[-1]) print dp[-1] dp -1 if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n,m = map(int,input().split())
    dp = [0 for i in range(n+1)]
    mod = 10**9+7
    for i in range(m):
        a = int(input())
        dp[a] = -1
    dp[0] = 1
    if dp[1]!=-1:
        dp[1] = 1
    for i in range(2,n+1):
        if dp[i]==-1:
            continue
        if dp[i-1]!=-1 and dp[i-2]!=-1:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] = dp[i]%mod
        elif dp[i-1]!=-1 and dp[i-2]==-1:
            dp[i] = dp[i-1]
        elif dp[i-1]==-1 and dp[i-2]!=-1:
            dp[i] = dp[i-2]
        else:
            dp[i] = 0
    print(dp[-1]) def main():
    n,m = map(int,input().split())
    dp = [0 for i in range(n+1)]
    mod = 10**9+7
    for i in range(m):
        a = int(input())
        dp[a] = -1
    dp[0] = 1
    if dp[1]!=-1:
        dp[1] = 1
    for i in range(2,n+1):
        if dp[i]==-1:
            continue
        if dp[i-1]!=-1 and dp[i-2]!=-1:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] = dp[i]%mod
        elif dp[i-1]!=-1 and dp[i-2]==-1:
            dp[i] = dp[i-1]
        elif dp[i-1]==-1 and dp[i-2]!=-1:
            dp[i] = dp[i-2]
        else:
            dp[i] = 0
    print(dp[-1]) main
def main():
    n,m = map(int,input().split())
    dp = [0 for i in range(n+1)]
    mod = 10**9+7
    for i in range(m):
        a = int(input())
        dp[a] = -1
    dp[0] = 1
    if dp[1]!=-1:
        dp[1] = 1
    for i in range(2,n+1):
        if dp[i]==-1:
            continue
        if dp[i-1]!=-1 and dp[i-2]!=-1:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] = dp[i]%mod
        elif dp[i-1]!=-1 and dp[i-2]==-1:
            dp[i] = dp[i-1]
        elif dp[i-1]==-1 and dp[i-2]!=-1:
            dp[i] = dp[i-2]
        else:
            dp[i] = 0
    print(dp[-1])

if __name__ == "__main__":
    main()
