import sys
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = 1000000007

if n >= 3:
    if 1 not in a  and 2 not in a:
        c = [1,2]
    elif 1 in a and 2 not in a:
        c = [0,1]
    elif 1 not in a and 2 in a:
        c = [1,0]
    else:
        c = [0,0]

    one,two = map(int, c)

    for i in range(3,n+1):
        if i in a:
            temp = 0
            one = two
            two= temp
        else:
            temp = one+two
            one = two
            two = temp

    print(temp%mod)
    sys.exit()
elif n == 2:
    if 1 not in a  and 2 not in a:
        c = [1,2]
    elif 1 in a and 2 not in a:
        c = [0,1]
    elif 1 not in a and 2 in a:
        c = [1,0]
    else:
        c = [0,0]

    print(c[1])
    sys.exit()
elif n == 1:
    if 1 in a:
        print(0)
        sys.exit()
    else:
        print(1)
        sys.exit()