n,m = list(map(int,input().split()))
a = [0]*m
for i in range(m):
    a[i] = int(input())

def stair(k):
    if k == 1:
        if 1 not in a:
            return 1
        else:
            return 0
    elif k == 2:
        if 2 not in a:
            return 1 + stair(1)
        else:
            return 0 + stair(1)
    if k not in a:
        if k-1 not in a:
            if k-2 not in a:
                return (stair(k-1)+stair(k-2))%1000000007
            else:
                return stair(k-1)
        else:
            if k-2 not in a:
                return stair(k-2)
            else:
                return 0
    else:
        return 0

print(stair(n))