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

ans = 0
def up(now):
    global ans
    if now == n:
        ans += 1
        return
    elif now > n:
        return
    
    if now+1 in a and now+2 in a:
        print(0)
        exit(0)
        #return
    elif now+1 in a:
        up(now+2)
    elif now+2 in a:
        up(now+1)
    else:
        up(now+1)
        up(now+2)
        
if __name__ == '__main__':
    up(0)
    print(ans % 1000000007)