#create date: 2020-07-25 09:13

import sys
stdin = sys.stdin
mod = 10**9+7

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n, m = na()
    a = [0] * (10**5+1)
    for i in range(m):
        st = ni()
        a[st] = 1

    dp = [0] * (10**5+1)
    dp[0] = 1
    if a[1] == 0: dp[1] = 1
    for i in range(2, n+1):
        if a[i] == 1:
            dp[i] = 0
        else:
            dp[i] = (dp[i-2] + dp[i-1]) % mod
    print(dp[n])

if __name__ == "__main__":
    main() import sys sys stdin = sys.stdin stdin sys.stdin sys stdin mod = 10**9+7 mod 10**9+7 10**9 10 9 7 def ns(): return stdin.readline().rstrip() ns def ni(): return int(ns()) ni def na(): return list(map(int, stdin.readline().split())) na def main():
    n, m = na()
    a = [0] * (10**5+1)
    for i in range(m):
        st = ni()
        a[st] = 1

    dp = [0] * (10**5+1)
    dp[0] = 1
    if a[1] == 0: dp[1] = 1
    for i in range(2, n+1):
        if a[i] == 1:
            dp[i] = 0
        else:
            dp[i] = (dp[i-2] + dp[i-1]) % mod
    print(dp[n]) main n, m = na() n na() na m a = [0] * (10**5+1) a [0] * (10**5+1) [0] 0 10**5+1 10**5 10 5 1 for i in range(m):
        st = ni()
        a[st] = 1

     i range(m) range m st = ni() st ni() ni a[st] = 1 a[st] a st 1 dp = [0] * (10**5+1) dp [0] * (10**5+1) [0] 0 10**5+1 10**5 10 5 1 dp[0] = 1 dp[0] dp 0 1 if a[1] == 0: dp[1] = 1
     a[1] == 0 a[1] a 1 0 for i in range(2, n+1):
        if a[i] == 1:
            dp[i] = 0
        else:
            dp[i] = (dp[i-2] + dp[i-1]) % mod
     i range(2, n+1) range 2 n+1 n 1 if a[i] == 1:
            dp[i] = 0
        else:
            dp[i] = (dp[i-2] + dp[i-1]) % mod
     a[i] == 1 a[i] a i 1 dp[i] = 0 dp[i] dp i 0 dp[i] = (dp[i-2] + dp[i-1]) % mod dp[i] dp i (dp[i-2] + dp[i-1]) % mod dp[i-2] + dp[i-1] dp[i-2] dp i-2 i 2 dp[i-1] dp i-1 i 1 mod print(dp[n]) print dp[n] dp n if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def ni(): return int(ns()) def ni(): return int(ns()) ni mod = 10**9+7 10**9+7 mod def ns(): return stdin.readline().rstrip() def ns(): return stdin.readline().rstrip() ns def na(): return list(map(int, stdin.readline().split())) def na(): return list(map(int, stdin.readline().split())) na stdin = sys.stdin sys.stdin stdin def main():
    n, m = na()
    a = [0] * (10**5+1)
    for i in range(m):
        st = ni()
        a[st] = 1

    dp = [0] * (10**5+1)
    dp[0] = 1
    if a[1] == 0: dp[1] = 1
    for i in range(2, n+1):
        if a[i] == 1:
            dp[i] = 0
        else:
            dp[i] = (dp[i-2] + dp[i-1]) % mod
    print(dp[n]) def main():
    n, m = na()
    a = [0] * (10**5+1)
    for i in range(m):
        st = ni()
        a[st] = 1

    dp = [0] * (10**5+1)
    dp[0] = 1
    if a[1] == 0: dp[1] = 1
    for i in range(2, n+1):
        if a[i] == 1:
            dp[i] = 0
        else:
            dp[i] = (dp[i-2] + dp[i-1]) % mod
    print(dp[n]) main
#create date: 2020-07-25 09:13

import sys
stdin = sys.stdin
mod = 10**9+7

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n, m = na()
    a = [0] * (10**5+1)
    for i in range(m):
        st = ni()
        a[st] = 1

    dp = [0] * (10**5+1)
    dp[0] = 1
    if a[1] == 0: dp[1] = 1
    for i in range(2, n+1):
        if a[i] == 1:
            dp[i] = 0
        else:
            dp[i] = (dp[i-2] + dp[i-1]) % mod
    print(dp[n])

if __name__ == "__main__":
    main()