def main():
    N,M = map(int,input().split())
    mod = 10**9 + 7
    a = [0]*(N+1)
    a[0] = 1
    banned = [False]*(N+1)
    for x in range(M):
        n = int(input())
        banned[n] = True
    for i in range(1,N+1):
        res = 0
        if not banned[i-1]:
            res += a[i-1]
        if not banned[i-2]:
            res += a[i-2]
        a[i] = res
    print(a[-1]%mod)
    return

main() def main():
    N,M = map(int,input().split())
    mod = 10**9 + 7
    a = [0]*(N+1)
    a[0] = 1
    banned = [False]*(N+1)
    for x in range(M):
        n = int(input())
        banned[n] = True
    for i in range(1,N+1):
        res = 0
        if not banned[i-1]:
            res += a[i-1]
        if not banned[i-2]:
            res += a[i-2]
        a[i] = res
    print(a[-1]%mod)
    return main N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 a = [0]*(N+1) a [0]*(N+1) [0] 0 N+1 N 1 a[0] = 1 a[0] a 0 1 banned = [False]*(N+1) banned [False]*(N+1) [False] False N+1 N 1 for x in range(M):
        n = int(input())
        banned[n] = True
     x range(M) range M n = int(input()) n int(input()) int input() input banned[n] = True banned[n] banned n True for i in range(1,N+1):
        res = 0
        if not banned[i-1]:
            res += a[i-1]
        if not banned[i-2]:
            res += a[i-2]
        a[i] = res
     i range(1,N+1) range 1 N+1 N 1 res = 0 res 0 if not banned[i-1]:
            res += a[i-1]
         not banned[i-1] banned[i-1] banned i-1 i 1 res += a[i-1] res a[i-1] a i-1 i 1 if not banned[i-2]:
            res += a[i-2]
         not banned[i-2] banned[i-2] banned i-2 i 2 res += a[i-2] res a[i-2] a i-2 i 2 a[i] = res a[i] a i res print(a[-1]%mod) print a[-1]%mod a[-1] a -1 mod return main() main def main():
    N,M = map(int,input().split())
    mod = 10**9 + 7
    a = [0]*(N+1)
    a[0] = 1
    banned = [False]*(N+1)
    for x in range(M):
        n = int(input())
        banned[n] = True
    for i in range(1,N+1):
        res = 0
        if not banned[i-1]:
            res += a[i-1]
        if not banned[i-2]:
            res += a[i-2]
        a[i] = res
    print(a[-1]%mod)
    return def main():
    N,M = map(int,input().split())
    mod = 10**9 + 7
    a = [0]*(N+1)
    a[0] = 1
    banned = [False]*(N+1)
    for x in range(M):
        n = int(input())
        banned[n] = True
    for i in range(1,N+1):
        res = 0
        if not banned[i-1]:
            res += a[i-1]
        if not banned[i-2]:
            res += a[i-2]
        a[i] = res
    print(a[-1]%mod)
    return main
def main():
    N,M = map(int,input().split())
    mod = 10**9 + 7
    a = [0]*(N+1)
    a[0] = 1
    banned = [False]*(N+1)
    for x in range(M):
        n = int(input())
        banned[n] = True
    for i in range(1,N+1):
        res = 0
        if not banned[i-1]:
            res += a[i-1]
        if not banned[i-2]:
            res += a[i-2]
        a[i] = res
    print(a[-1]%mod)
    return

main()
