def main():
    n,m = map(int,input().split())
    A = []
    for _ in range(m):
        a = int(input())
        A.append(a)
    mod = 10**9+7
    if 1 in A:
        ans = [1,0]
    else:
        ans = [1,1]
    for i in range(2,n+1):
        if i in A:
            ans.append(0)
            ans.pop(0)
        else:
            ans.append((ans[0]+ans[1])%mod)
            ans.pop(0)

    print(ans[1]%mod)

if __name__ == "__main__":
    main()