while True:
    try:
        N, M = map(int, input().split())
        a = [int(input()) for _ in range(M)]
        
        if (1 in a):
            f = [1, 0]
        else:
            f = [1, 1]
            
        for i in range(2, N+1):
            if i in a:
                f.append(0)
            else:
                f.append(f[i-1] + f[i-2])
        
        print(f[N]%1000000007)
    except:
        break