LI = lambda: list(map(int, input().split()))

N, M = LI()
A = [int(input()) for _ in range(M)]

MOD = 10 ** 9 + 7


def main():
    s = set(A)
    dp = [0] * (N + 1)
    dp[0] = 1
    for i in range(1, N + 1):
        if i in s:
            continue
        v = dp[i - 1]
        if i >= 2:
            v += dp[i - 2]
        dp[i] = v % MOD
    
    ans = dp[-1]
    print(ans)


if __name__ == "__main__":
    main() LI = lambda: list(map(int, input().split())) LI lambda: list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split N, M = LI() N LI() LI 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 = [int(input()) for _ in range(M)] A [int(input()) for _ in range(M)] MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 def main():
    s = set(A)
    dp = [0] * (N + 1)
    dp[0] = 1
    for i in range(1, N + 1):
        if i in s:
            continue
        v = dp[i - 1]
        if i >= 2:
            v += dp[i - 2]
        dp[i] = v % MOD
    
    ans = dp[-1]
    print(ans) main s = set(A) s set(A) set A dp = [0] * (N + 1) dp [0] * (N + 1) [0] 0 N + 1 N 1 dp[0] = 1 dp[0] dp 0 1 for i in range(1, N + 1):
        if i in s:
            continue
        v = dp[i - 1]
        if i >= 2:
            v += dp[i - 2]
        dp[i] = v % MOD
    
     i range(1, N + 1) range 1 N + 1 N 1 if i in s:
            continue
         i in s i s continue v = dp[i - 1] v dp[i - 1] dp i - 1 i 1 if i >= 2:
            v += dp[i - 2]
         i >= 2 i 2 v += dp[i - 2] v dp[i - 2] dp i - 2 i 2 dp[i] = v % MOD dp[i] dp i v % MOD v MOD ans = dp[-1] ans dp[-1] dp -1 print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main M = LI() LI() M def main():
    s = set(A)
    dp = [0] * (N + 1)
    dp[0] = 1
    for i in range(1, N + 1):
        if i in s:
            continue
        v = dp[i - 1]
        if i >= 2:
            v += dp[i - 2]
        dp[i] = v % MOD
    
    ans = dp[-1]
    print(ans) def main():
    s = set(A)
    dp = [0] * (N + 1)
    dp[0] = 1
    for i in range(1, N + 1):
        if i in s:
            continue
        v = dp[i - 1]
        if i >= 2:
            v += dp[i - 2]
        dp[i] = v % MOD
    
    ans = dp[-1]
    print(ans) main LI = lambda: list(map(int, input().split())) lambda: list(map(int, input().split())) LI N, M = LI() LI() N MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD A = [int(input()) for _ in range(M)] [int(input()) for _ in range(M)] A
LI = lambda: list(map(int, input().split()))

N, M = LI()
A = [int(input()) for _ in range(M)]

MOD = 10 ** 9 + 7


def main():
    s = set(A)
    dp = [0] * (N + 1)
    dp[0] = 1
    for i in range(1, N + 1):
        if i in s:
            continue
        v = dp[i - 1]
        if i >= 2:
            v += dp[i - 2]
        dp[i] = v % MOD
    
    ans = dp[-1]
    print(ans)


if __name__ == "__main__":
    main()
