n, m = map(int,input().split())
a = list(int(input()) for _ in range(m))
dp = [[] for _ in range(n + 1)]
dp[0] = 1
# j = 0
if m == 0:
    dp[1] = 1
    for i in range(2, n + 1):
        dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
    print(dp[n])
    exit()
if a[0] == 1:
    dp[1] = 0
    j = 1
else:
    dp[1] = 1
    j = 0
for i in range(2, n + 1):
    # print(i, dp)
    if j < m:
        if a[j]  == i:
            dp[i] = 0
            j += 1
            continue
    dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
print(dp[n]) n, m = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m a = list(int(input()) for _ in range(m)) a list(int(input()) for _ in range(m)) list int(input()) int input() input [] for _ in range(n + 1) for _ in range(n + 1) _ range(n + 1) range n + 1 n 1 for _ in range(n + 1) [] dp = [[] for _ in range(n + 1)] dp [[] for _ in range(n + 1)] dp[0] = 1 dp[0] dp 0 1 if m == 0:
    dp[1] = 1
    for i in range(2, n + 1):
        dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
    print(dp[n])
    exit() m == 0 m 0 dp[1] = 1 dp[1] dp 1 1 for i in range(2, n + 1):
        dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
     i range(2, n + 1) range 2 n + 1 n 1 dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007 dp[i] dp i (dp[i - 1] + dp[i - 2]) % 1000000007 dp[i - 1] + dp[i - 2] dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 1000000007 print(dp[n]) print dp[n] dp n exit() exit if a[0] == 1:
    dp[1] = 0
    j = 1
else:
    dp[1] = 1
    j = 0 a[0] == 1 a[0] a 0 1 dp[1] = 0 dp[1] dp 1 0 j = 1 j 1 dp[1] = 1 dp[1] dp 1 1 j = 0 j 0 for i in range(2, n + 1):
    # print(i, dp)
    if j < m:
        if a[j]  == i:
            dp[i] = 0
            j += 1
            continue
    dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007 i range(2, n + 1) range 2 n + 1 n 1 if j < m:
        if a[j]  == i:
            dp[i] = 0
            j += 1
            continue
     j < m j m if a[j]  == i:
            dp[i] = 0
            j += 1
            continue
     a[j]  == i a[j] a j i dp[i] = 0 dp[i] dp i 0 j += 1 j 1 continue dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007 dp[i] dp i (dp[i - 1] + dp[i - 2]) % 1000000007 dp[i - 1] + dp[i - 2] dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 1000000007 print(dp[n]) print dp[n] dp n j = 0 0 j dp = [[] for _ in range(n + 1)] [[] for _ in range(n + 1)] dp m = map(int,input().split()) map(int,input().split()) m j = 1 1 j j += 1 1 j n, m = map(int,input().split()) map(int,input().split()) n a = list(int(input()) for _ in range(m)) list(int(input()) for _ in range(m)) a
n, m = map(int,input().split())
a = list(int(input()) for _ in range(m))
dp = [[] for _ in range(n + 1)]
dp[0] = 1
# j = 0
if m == 0:
    dp[1] = 1
    for i in range(2, n + 1):
        dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
    print(dp[n])
    exit()
if a[0] == 1:
    dp[1] = 0
    j = 1
else:
    dp[1] = 1
    j = 0
for i in range(2, n + 1):
    # print(i, dp)
    if j < m:
        if a[j]  == i:
            dp[i] = 0
            j += 1
            continue
    dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
print(dp[n])