N, M = [int(x) for x in input().split()]
A = set()

MOD = 10 ** 9 + 7

for _ in range(M):
    A.add(int(input()))

result = {0: 1}

for i in range(1, N+1):

    # 階段が壊れている場合にはそこに行くパターンは無い
    if i in A:
        result[i] = 0

    # それ以外の場合、前の段と前の前の段まで行くパターンを加算した数になる
    else:
        if i - 1 in result:
            min_1 = result[i-1]
        else:
            min_1 = 0
        if i - 2 in result:
            min_2 = result[i-2]
        else:
            min_2 = 0
        result[i] = (min_2 + min_1) % MOD

print(result[N]) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x N, M = [int(x) for x in input().split()] N [int(x) for x in input().split()] M A = set() A set() set MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 for _ in range(M):
    A.add(int(input())) _ range(M) range M A.add(int(input())) A.add A add int(input()) int input() input result = {0: 1} result {0: 1} 0 0 1 for i in range(1, N+1):

    # 階段が壊れている場合にはそこに行くパターンは無い
    if i in A:
        result[i] = 0

    # それ以外の場合、前の段と前の前の段まで行くパターンを加算した数になる
    else:
        if i - 1 in result:
            min_1 = result[i-1]
        else:
            min_1 = 0
        if i - 2 in result:
            min_2 = result[i-2]
        else:
            min_2 = 0
        result[i] = (min_2 + min_1) % MOD i range(1, N+1) range 1 N+1 N 1 if i in A:
        result[i] = 0

    # それ以外の場合、前の段と前の前の段まで行くパターンを加算した数になる
    else:
        if i - 1 in result:
            min_1 = result[i-1]
        else:
            min_1 = 0
        if i - 2 in result:
            min_2 = result[i-2]
        else:
            min_2 = 0
        result[i] = (min_2 + min_1) % MOD i in A i A result[i] = 0 result[i] result i 0 if i - 1 in result:
            min_1 = result[i-1]
        else:
            min_1 = 0
         i - 1 in result i - 1 i 1 result min_1 = result[i-1] min_1 result[i-1] result i-1 i 1 min_1 = 0 min_1 0 if i - 2 in result:
            min_2 = result[i-2]
        else:
            min_2 = 0
         i - 2 in result i - 2 i 2 result min_2 = result[i-2] min_2 result[i-2] result i-2 i 2 min_2 = 0 min_2 0 result[i] = (min_2 + min_1) % MOD result[i] result i (min_2 + min_1) % MOD min_2 + min_1 min_2 min_1 MOD print(result[N]) print result[N] result N min_1 = result[i-1] result[i-1] min_1 min_2 = result[i-2] result[i-2] min_2 min_1 = 0 0 min_1 N, M = [int(x) for x in input().split()] [int(x) for x in input().split()] N result = {0: 1} {0: 1} result MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD M = [int(x) for x in input().split()] [int(x) for x in input().split()] M A = set() set() A min_2 = 0 0 min_2
N, M = [int(x) for x in input().split()]
A = set()

MOD = 10 ** 9 + 7

for _ in range(M):
    A.add(int(input()))

result = {0: 1}

for i in range(1, N+1):

    # 階段が壊れている場合にはそこに行くパターンは無い
    if i in A:
        result[i] = 0

    # それ以外の場合、前の段と前の前の段まで行くパターンを加算した数になる
    else:
        if i - 1 in result:
            min_1 = result[i-1]
        else:
            min_1 = 0
        if i - 2 in result:
            min_2 = result[i-2]
        else:
            min_2 = 0
        result[i] = (min_2 + min_1) % MOD

print(result[N])
