import sys


def read():
    return sys.stdin.readline().rstrip()


def main():
    n, m = map(int, read().split())
    a = {int(read()) - 1 for _ in range(m)}
    if n == 1:
        print(1)
        return
    mod = 10**9 + 7
    dp = [0] * n
    if 0 not in a:
        dp[0] = 1
    if 1 not in a:
        dp[1] = 1 + dp[0]
    for i in range(2, n):
        if i in a:
            continue
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
    print(dp[-1])


if __name__ == '__main__':
    main() import sys sys def read():
    return sys.stdin.readline().rstrip() read return sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip def main():
    n, m = map(int, read().split())
    a = {int(read()) - 1 for _ in range(m)}
    if n == 1:
        print(1)
        return
    mod = 10**9 + 7
    dp = [0] * n
    if 0 not in a:
        dp[0] = 1
    if 1 not in a:
        dp[1] = 1 + dp[0]
    for i in range(2, n):
        if i in a:
            continue
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
    print(dp[-1]) main n, m = map(int, read().split()) n map(int, read().split()) map int read().split() ().split () read split m int(read()) - 1 for _ in range(m) for _ in range(m) _ range(m) range m for _ in range(m) int(read()) - 1 int(read()) int read() read 1 a = {int(read()) - 1 for _ in range(m)} a if n == 1:
        print(1)
        return
     n == 1 n 1 print(1) print 1 return mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 dp = [0] * n dp [0] * n [0] 0 n if 0 not in a:
        dp[0] = 1
     0 not in a 0 a dp[0] = 1 dp[0] dp 0 1 if 1 not in a:
        dp[1] = 1 + dp[0]
     1 not in a 1 a dp[1] = 1 + dp[0] dp[1] dp 1 1 + dp[0] 1 dp[0] dp 0 for i in range(2, n):
        if i in a:
            continue
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
     i range(2, n) range 2 n if i in a:
            continue
         i in a i a continue dp[i] = (dp[i - 1] + dp[i - 2]) % mod dp[i] dp i (dp[i - 1] + dp[i - 2]) % mod dp[i - 1] + dp[i - 2] dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 mod print(dp[-1]) print dp[-1] dp -1 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def read():
    return sys.stdin.readline().rstrip() def read():
    return sys.stdin.readline().rstrip() read def main():
    n, m = map(int, read().split())
    a = {int(read()) - 1 for _ in range(m)}
    if n == 1:
        print(1)
        return
    mod = 10**9 + 7
    dp = [0] * n
    if 0 not in a:
        dp[0] = 1
    if 1 not in a:
        dp[1] = 1 + dp[0]
    for i in range(2, n):
        if i in a:
            continue
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
    print(dp[-1]) def main():
    n, m = map(int, read().split())
    a = {int(read()) - 1 for _ in range(m)}
    if n == 1:
        print(1)
        return
    mod = 10**9 + 7
    dp = [0] * n
    if 0 not in a:
        dp[0] = 1
    if 1 not in a:
        dp[1] = 1 + dp[0]
    for i in range(2, n):
        if i in a:
            continue
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
    print(dp[-1]) main
import sys


def read():
    return sys.stdin.readline().rstrip()


def main():
    n, m = map(int, read().split())
    a = {int(read()) - 1 for _ in range(m)}
    if n == 1:
        print(1)
        return
    mod = 10**9 + 7
    dp = [0] * n
    if 0 not in a:
        dp[0] = 1
    if 1 not in a:
        dp[1] = 1 + dp[0]
    for i in range(2, n):
        if i in a:
            continue
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
    print(dp[-1])


if __name__ == '__main__':
    main()
