    import sys
    n = [int(i) for i in input().split()]
    a = []
    for i in range(n[1]):
        a.append(int(input()))
     
    a.append(n[0]+1)
    a = sorted(list(set(a)))
     
     
    def k(i):
        ans = 1
        pri = 0
        for idx in range(i):
            tmp = ans
            ans += pri
            pri = tmp
        return ans
     
     
    for i in range(1, len(a)):
        if a[i]-a[i-1] == 1:
            print(0)
            sys.exit()
    j = -1
    ans = 1
    for i in a:
        ii = i-j-2
        ans = ans*k(ii)
        j = i
    if len(a) == 1:
        ans = k(n[0])
    print(ans % 1000000007)