import sys

mod = 10**9+7

def main():

    n,m=list(map(int,input().split(' ')))

    if m > 0:

        aaa = set(map(int,sys.stdin))

    else:

        aaa = set()



    dp = [0] * (n+1)

    dp[0] = 1

    dp[1] = 1 if 1 not in aaa else 0

    for i in range(2,n+1):

        if i in aaa:

            continue

        dp[i] = dp[i-1]+dp[i-2]



    print((dp[n]%mod))



main()
import sys

mod = 10**9+7

def main():

    n,m=list(map(int,input().split(' ')))

    if m > 0:

        aaa = set(map(int,sys.stdin))

    else:

        aaa = set()



    dp = [0] * (n+1)

    dp[0] = 1

    dp[1] = 1 if 1 not in aaa else 0

    for i in range(2,n+1):

        if i in aaa:

            continue

        dp[i] = (dp[i-1]+dp[i-2])%mod



    print((dp[n]))



main()
import sys

mod = 10**9 + 7


def main():
    n, m = list(map(int, input().split(" ")))
    if m > 0:
        aaa = set(map(int, sys.stdin))
    else:
        aaa = set()
    dp = [0] * (n + 1)
    dp[0] = 1
    dp[1] = 1 if 1 not in aaa else 0
    for i in range(2, n + 1):
        if i in aaa:
            continue
        dp[i] = dp[i - 1] + dp[i - 2]
    print((dp[n] % mod))


main()

import sys

mod = 10**9 + 7


def main():
    n, m = list(map(int, input().split(" ")))
    if m > 0:
        aaa = set(map(int, sys.stdin))
    else:
        aaa = set()
    dp = [0] * (n + 1)
    dp[0] = 1
    dp[1] = 1 if 1 not in aaa else 0
    for i in range(2, n + 1):
        if i in aaa:
            continue
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
    print((dp[n]))


main()

-        dp[i] = dp[i - 1] + dp[i - 2] -    print((dp[n] % mod)) +        dp[i] = (dp[i - 1] + dp[i - 2]) % mod +    print((dp[n]))