N,M = map(int,input().split())

def fib(n):
    if n == 0:
        return 0
    one = 1
    two = 1
    for _ in range(n-2):
        two,one = one + two,two
    return two

ans,now = 1,0
for i in range(M):
    a = int(input())
    ans *= fib(a - now)
    now = a+1
    if ans > 10**9+7:
        ans %= 10**9 + 7
ans *= fib(N - now + 1)
ans %= 10**9 + 7

print(ans) N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M def fib(n):
    if n == 0:
        return 0
    one = 1
    two = 1
    for _ in range(n-2):
        two,one = one + two,two
    return two fib if n == 0:
        return 0
     n == 0 n 0 return 0 0 one = 1 one 1 two = 1 two 1 for _ in range(n-2):
        two,one = one + two,two
     _ range(n-2) range n-2 n 2 two,one = one + two,two two one + two one two one two return two two n n ans,now = 1,0 ans 1 now 0 for i in range(M):
    a = int(input())
    ans *= fib(a - now)
    now = a+1
    if ans > 10**9+7:
        ans %= 10**9 + 7 i range(M) range M a = int(input()) a int(input()) int input() input ans *= fib(a - now) ans fib(a - now) fib a - now a now now = a+1 now a+1 a 1 if ans > 10**9+7:
        ans %= 10**9 + 7 ans > 10**9+7 ans 10**9+7 10**9 10 9 7 ans %= 10**9 + 7 ans 10**9 + 7 10**9 10 9 7 ans *= fib(N - now + 1) ans fib(N - now + 1) fib N - now + 1 N - now N now 1 ans %= 10**9 + 7 ans 10**9 + 7 10**9 10 9 7 print(ans) print ans now = a+1 a+1 now ans,now = 1,0 1 ans ans %= 10**9 + 7 10**9 + 7 ans ans *= fib(N - now + 1) fib(N - now + 1) ans ans *= fib(a - now) fib(a - now) ans now = 1,0 0 now N,M = map(int,input().split()) map(int,input().split()) N M = map(int,input().split()) map(int,input().split()) M def fib(n):
    if n == 0:
        return 0
    one = 1
    two = 1
    for _ in range(n-2):
        two,one = one + two,two
    return two def fib(n):
    if n == 0:
        return 0
    one = 1
    two = 1
    for _ in range(n-2):
        two,one = one + two,two
    return two fib a = int(input()) int(input()) a ans %= 10**9 + 7 10**9 + 7 ans
N,M = map(int,input().split())

def fib(n):
    if n == 0:
        return 0
    one = 1
    two = 1
    for _ in range(n-2):
        two,one = one + two,two
    return two

ans,now = 1,0
for i in range(M):
    a = int(input())
    ans *= fib(a - now)
    now = a+1
    if ans > 10**9+7:
        ans %= 10**9 + 7
ans *= fib(N - now + 1)
ans %= 10**9 + 7

print(ans)