def main():
    n, m = map(int, input().split())
    dp = [0] * (n + 1)
    dp[0] = 1
    for _ in range(m):
        a = int(input())
        dp[a] = -1
    mod = 10 ** 9 + 7

    for i in range(n + 1):
        if dp[i] == 0:
            if i - 1 >= 0 and dp[i - 1] != -1:
                dp[i] += dp[i - 1]
            if i - 2 >= 0 and dp[i - 2] != -1:
                dp[i] += dp[i - 2]

    print(dp[-1] % mod)


if __name__ == "__main__":
    main() def main():
    n, m = map(int, input().split())
    dp = [0] * (n + 1)
    dp[0] = 1
    for _ in range(m):
        a = int(input())
        dp[a] = -1
    mod = 10 ** 9 + 7

    for i in range(n + 1):
        if dp[i] == 0:
            if i - 1 >= 0 and dp[i - 1] != -1:
                dp[i] += dp[i - 1]
            if i - 2 >= 0 and dp[i - 2] != -1:
                dp[i] += dp[i - 2]

    print(dp[-1] % mod) main n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m dp = [0] * (n + 1) dp [0] * (n + 1) [0] 0 n + 1 n 1 dp[0] = 1 dp[0] dp 0 1 for _ in range(m):
        a = int(input())
        dp[a] = -1
     _ range(m) range m a = int(input()) a int(input()) int input() input dp[a] = -1 dp[a] dp a -1 mod = 10 ** 9 + 7 mod 10 ** 9 + 7 10 ** 9 10 9 7 for i in range(n + 1):
        if dp[i] == 0:
            if i - 1 >= 0 and dp[i - 1] != -1:
                dp[i] += dp[i - 1]
            if i - 2 >= 0 and dp[i - 2] != -1:
                dp[i] += dp[i - 2]

     i range(n + 1) range n + 1 n 1 if dp[i] == 0:
            if i - 1 >= 0 and dp[i - 1] != -1:
                dp[i] += dp[i - 1]
            if i - 2 >= 0 and dp[i - 2] != -1:
                dp[i] += dp[i - 2]

     dp[i] == 0 dp[i] dp i 0 if i - 1 >= 0 and dp[i - 1] != -1:
                dp[i] += dp[i - 1]
             i - 1 >= 0 and dp[i - 1] != -1 i - 1 >= 0 i - 1 i 1 0 dp[i - 1] != -1 dp[i - 1] dp i - 1 i 1 -1 dp[i] += dp[i - 1] dp[i] dp i dp[i - 1] dp i - 1 i 1 if i - 2 >= 0 and dp[i - 2] != -1:
                dp[i] += dp[i - 2]

     i - 2 >= 0 and dp[i - 2] != -1 i - 2 >= 0 i - 2 i 2 0 dp[i - 2] != -1 dp[i - 2] dp i - 2 i 2 -1 dp[i] += dp[i - 2] dp[i] dp i dp[i - 2] dp i - 2 i 2 print(dp[-1] % mod) print dp[-1] % mod dp[-1] dp -1 mod if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n, m = map(int, input().split())
    dp = [0] * (n + 1)
    dp[0] = 1
    for _ in range(m):
        a = int(input())
        dp[a] = -1
    mod = 10 ** 9 + 7

    for i in range(n + 1):
        if dp[i] == 0:
            if i - 1 >= 0 and dp[i - 1] != -1:
                dp[i] += dp[i - 1]
            if i - 2 >= 0 and dp[i - 2] != -1:
                dp[i] += dp[i - 2]

    print(dp[-1] % mod) def main():
    n, m = map(int, input().split())
    dp = [0] * (n + 1)
    dp[0] = 1
    for _ in range(m):
        a = int(input())
        dp[a] = -1
    mod = 10 ** 9 + 7

    for i in range(n + 1):
        if dp[i] == 0:
            if i - 1 >= 0 and dp[i - 1] != -1:
                dp[i] += dp[i - 1]
            if i - 2 >= 0 and dp[i - 2] != -1:
                dp[i] += dp[i - 2]

    print(dp[-1] % mod) main
def main():
    n, m = map(int, input().split())
    dp = [0] * (n + 1)
    dp[0] = 1
    for _ in range(m):
        a = int(input())
        dp[a] = -1
    mod = 10 ** 9 + 7

    for i in range(n + 1):
        if dp[i] == 0:
            if i - 1 >= 0 and dp[i - 1] != -1:
                dp[i] += dp[i - 1]
            if i - 2 >= 0 and dp[i - 2] != -1:
                dp[i] += dp[i - 2]

    print(dp[-1] % mod)


if __name__ == "__main__":
    main()
