N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]

step = [0]*(N+1)
last = -1
for a in A:
    if a == last + 1 or a == last - 1:
        print(0)
        exit()
    step[a] = 1
    last = a

ans = [0] + [1] + [0]*N

chk = 0
for i in range(1, N+1):
    if step[i] == 0 and chk <= 0:
        ans[i+1] = ans[i] + ans[i-1]
        chk = 0
    elif step[i] == 1:
        ans[i+1] = ans[i]
        chk = 2
    elif step[i] == 0 and chk > 0:
        ans[i+1] = ans[i]
        chk -= 1
        
print(ans[-1]%(10**9 + 7)) N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M int(input()) for _ in range(M) for _ in range(M) _ range(M) range M for _ in range(M) int(input()) int input() input A = [int(input()) for _ in range(M)] A [int(input()) for _ in range(M)] step = [0]*(N+1) step [0]*(N+1) [0] 0 N+1 N 1 last = -1 last -1 for a in A:
    if a == last + 1 or a == last - 1:
        print(0)
        exit()
    step[a] = 1
    last = a a A if a == last + 1 or a == last - 1:
        print(0)
        exit()
     a == last + 1 or a == last - 1 a == last + 1 a last + 1 last 1 a == last - 1 a last - 1 last 1 print(0) print 0 exit() exit step[a] = 1 step[a] step a 1 last = a last a ans = [0] + [1] + [0]*N ans [0] + [1] + [0]*N [0] + [1] [0] 0 [1] 1 [0]*N [0] 0 N chk = 0 chk 0 for i in range(1, N+1):
    if step[i] == 0 and chk <= 0:
        ans[i+1] = ans[i] + ans[i-1]
        chk = 0
    elif step[i] == 1:
        ans[i+1] = ans[i]
        chk = 2
    elif step[i] == 0 and chk > 0:
        ans[i+1] = ans[i]
        chk -= 1
         i range(1, N+1) range 1 N+1 N 1 if step[i] == 0 and chk <= 0:
        ans[i+1] = ans[i] + ans[i-1]
        chk = 0
    elif step[i] == 1:
        ans[i+1] = ans[i]
        chk = 2
    elif step[i] == 0 and chk > 0:
        ans[i+1] = ans[i]
        chk -= 1
         step[i] == 0 and chk <= 0 step[i] == 0 step[i] step i 0 chk <= 0 chk 0 ans[i+1] = ans[i] + ans[i-1] ans[i+1] ans i+1 i 1 ans[i] + ans[i-1] ans[i] ans i ans[i-1] ans i-1 i 1 chk = 0 chk 0 elif step[i] == 1:
        ans[i+1] = ans[i]
        chk = 2
     step[i] == 1 step[i] step i 1 ans[i+1] = ans[i] ans[i+1] ans i+1 i 1 ans[i] ans i chk = 2 chk 2 elif step[i] == 0 and chk > 0:
        ans[i+1] = ans[i]
        chk -= 1
         step[i] == 0 and chk > 0 step[i] == 0 step[i] step i 0 chk > 0 chk 0 ans[i+1] = ans[i] ans[i+1] ans i+1 i 1 ans[i] ans i chk -= 1 chk 1 print(ans[-1]%(10**9 + 7)) print ans[-1]%(10**9 + 7) ans[-1] ans -1 10**9 + 7 10**9 10 9 7 last = a a last A = [int(input()) for _ in range(M)] [int(input()) for _ in range(M)] A ans = [0] + [1] + [0]*N [0] + [1] + [0]*N ans M = map(int, input().split()) map(int, input().split()) M chk = 2 2 chk N, M = map(int, input().split()) map(int, input().split()) N chk = 0 0 chk last = -1 -1 last chk = 0 0 chk chk -= 1 1 chk step = [0]*(N+1) [0]*(N+1) step
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]

step = [0]*(N+1)
last = -1
for a in A:
    if a == last + 1 or a == last - 1:
        print(0)
        exit()
    step[a] = 1
    last = a

ans = [0] + [1] + [0]*N

chk = 0
for i in range(1, N+1):
    if step[i] == 0 and chk <= 0:
        ans[i+1] = ans[i] + ans[i-1]
        chk = 0
    elif step[i] == 1:
        ans[i+1] = ans[i]
        chk = 2
    elif step[i] == 0 and chk > 0:
        ans[i+1] = ans[i]
        chk -= 1
        
print(ans[-1]%(10**9 + 7))
