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]

    for i in range(2,n):
        if i+1 in a:
            c.append(0)
        else:
            c.append((c[i-2] + c[i-1])%mod)

    print(c[len(c)-1])
    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()