import sys
sys.setrecursionlimit(10**5+10)
N, M = map(int, input().split())
A = set([int(input()) for _ in range(M)])
MOD = 1000000007
memo = {}
def Fib(n, MOD):
    if n in A:
        return 0
    elif n == 0:
        return 1
    elif n == 1:
        return 1
    elif n in memo:
        return memo[n]
    else:
        memo[n] = ( Fib(n-1, MOD) + Fib(n-2, MOD) ) % MOD
        return memo[n]
print(Fib(N, MOD)) import sys sys sys.setrecursionlimit(10**5+10) sys.setrecursionlimit sys setrecursionlimit 10**5+10 10**5 10 5 10 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 = set([int(input()) for _ in range(M)]) A set([int(input()) for _ in range(M)]) set [int(input()) for _ in range(M)] MOD = 1000000007 MOD 1000000007 memo = {} memo {} def Fib(n, MOD):
    if n in A:
        return 0
    elif n == 0:
        return 1
    elif n == 1:
        return 1
    elif n in memo:
        return memo[n]
    else:
        memo[n] = ( Fib(n-1, MOD) + Fib(n-2, MOD) ) % MOD
        return memo[n] Fib if n in A:
        return 0
    elif n == 0:
        return 1
    elif n == 1:
        return 1
    elif n in memo:
        return memo[n]
    else:
        memo[n] = ( Fib(n-1, MOD) + Fib(n-2, MOD) ) % MOD
        return memo[n] n in A n A return 0 0 elif n == 0:
        return 1
     n == 0 n 0 return 1 1 elif n == 1:
        return 1
     n == 1 n 1 return 1 1 elif n in memo:
        return memo[n]
     n in memo n memo return memo[n] memo[n] memo n memo[n] = ( Fib(n-1, MOD) + Fib(n-2, MOD) ) % MOD memo[n] memo n ( Fib(n-1, MOD) + Fib(n-2, MOD) ) % MOD Fib(n-1, MOD) + Fib(n-2, MOD) Fib(n-1, MOD) Fib n-1 n 1 MOD Fib(n-2, MOD) Fib n-2 n 2 MOD MOD return memo[n] memo[n] memo n n n MOD MOD print(Fib(N, MOD)) print Fib(N, MOD) Fib N MOD A = set([int(input()) for _ in range(M)]) set([int(input()) for _ in range(M)]) A memo = {} {} memo M = map(int, input().split()) map(int, input().split()) M def Fib(n, MOD):
    if n in A:
        return 0
    elif n == 0:
        return 1
    elif n == 1:
        return 1
    elif n in memo:
        return memo[n]
    else:
        memo[n] = ( Fib(n-1, MOD) + Fib(n-2, MOD) ) % MOD
        return memo[n] def Fib(n, MOD):
    if n in A:
        return 0
    elif n == 0:
        return 1
    elif n == 1:
        return 1
    elif n in memo:
        return memo[n]
    else:
        memo[n] = ( Fib(n-1, MOD) + Fib(n-2, MOD) ) % MOD
        return memo[n] Fib N, M = map(int, input().split()) map(int, input().split()) N MOD = 1000000007 1000000007 MOD
import sys
sys.setrecursionlimit(10**5+10)
N, M = map(int, input().split())
A = set([int(input()) for _ in range(M)])
MOD = 1000000007
memo = {}
def Fib(n, MOD):
    if n in A:
        return 0
    elif n == 0:
        return 1
    elif n == 1:
        return 1
    elif n in memo:
        return memo[n]
    else:
        memo[n] = ( Fib(n-1, MOD) + Fib(n-2, MOD) ) % MOD
        return memo[n]
print(Fib(N, MOD))