N,M = map(int,input().split())
A = [int(input()) for i in range(M)]
n = 0
if M != 0:
    a = b = A[0]
else:
    a = b = -2
c = 0
ans = [0,1]
for i in range(1,N+1):
    if  i == a:
        c = 0
        n += 1
        b = a
        if n <= M-1:
            a = A[n]
    elif i-2 == b:
        c = ans[-1]
    elif i-1 == b :
        c = ans[-2]
    else:
        c  = ans[-1] + ans[-2]
    c %= 10**9 + 7
    ans.append(c)
print(ans[-1]) N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M int(input()) for i in range(M) for i in range(M) i range(M) range M for i in range(M) int(input()) int input() input A = [int(input()) for i in range(M)] A [int(input()) for i in range(M)] n = 0 n 0 if M != 0:
    a = b = A[0]
else:
    a = b = -2 M != 0 M 0 a = b = A[0] a A[0] A 0 = b = A[0] b A[0] a = b = -2 a -2 = b = -2 b -2 c = 0 c 0 ans = [0,1] ans [0,1] 0 1 for i in range(1,N+1):
    if  i == a:
        c = 0
        n += 1
        b = a
        if n <= M-1:
            a = A[n]
    elif i-2 == b:
        c = ans[-1]
    elif i-1 == b :
        c = ans[-2]
    else:
        c  = ans[-1] + ans[-2]
    c %= 10**9 + 7
    ans.append(c) i range(1,N+1) range 1 N+1 N 1 if  i == a:
        c = 0
        n += 1
        b = a
        if n <= M-1:
            a = A[n]
    elif i-2 == b:
        c = ans[-1]
    elif i-1 == b :
        c = ans[-2]
    else:
        c  = ans[-1] + ans[-2]
     i == a i a c = 0 c 0 n += 1 n 1 b = a b a if n <= M-1:
            a = A[n]
     n <= M-1 n M-1 M 1 a = A[n] a A[n] A n elif i-2 == b:
        c = ans[-1]
     i-2 == b i-2 i 2 b c = ans[-1] c ans[-1] ans -1 elif i-1 == b :
        c = ans[-2]
     i-1 == b i-1 i 1 b c = ans[-2] c ans[-2] ans -2 c  = ans[-1] + ans[-2] c ans[-1] + ans[-2] ans[-1] ans -1 ans[-2] ans -2 c %= 10**9 + 7 c 10**9 + 7 10**9 10 9 7 ans.append(c) ans.append ans append c print(ans[-1]) print ans[-1] ans -1 a = A[n] A[n] a M = map(int,input().split()) map(int,input().split()) M n = 0 0 n a = b = A[0] A[0] a c = ans[-2] ans[-2] c c %= 10**9 + 7 10**9 + 7 c b = -2 -2 b b = A[0] A[0] b A = [int(input()) for i in range(M)] [int(input()) for i in range(M)] A c  = ans[-1] + ans[-2] ans[-1] + ans[-2] c b = a a b N,M = map(int,input().split()) map(int,input().split()) N c = ans[-1] ans[-1] c ans = [0,1] [0,1] ans a = b = -2 -2 a c = 0 0 c c = 0 0 c n += 1 1 n
N,M = map(int,input().split())
A = [int(input()) for i in range(M)]
n = 0
if M != 0:
    a = b = A[0]
else:
    a = b = -2
c = 0
ans = [0,1]
for i in range(1,N+1):
    if  i == a:
        c = 0
        n += 1
        b = a
        if n <= M-1:
            a = A[n]
    elif i-2 == b:
        c = ans[-1]
    elif i-1 == b :
        c = ans[-2]
    else:
        c  = ans[-1] + ans[-2]
    c %= 10**9 + 7
    ans.append(c)
print(ans[-1])