import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    n, m = map(int, input().split())
    a = [0] * n
    MOD = 10 ** 9 + 7
    for _ in range(m):
        a[int(input())] = 1
    dp = [0] * (n+1)
    dp[0] = 1
    for i in range(n):
        dp[i] %= MOD
        if a[i]:
            dp[i] = 0
        if i + 1 <= n:
            dp[i+1] += dp[i]
        if i + 2 <= n:
            dp[i+2] += dp[i]
    print(dp[-1]%MOD)
    
if __name__ == '__main__':
    main() import sys sys input = lambda: sys.stdin.readline().rstrip() input lambda: 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, input().split())
    a = [0] * n
    MOD = 10 ** 9 + 7
    for _ in range(m):
        a[int(input())] = 1
    dp = [0] * (n+1)
    dp[0] = 1
    for i in range(n):
        dp[i] %= MOD
        if a[i]:
            dp[i] = 0
        if i + 1 <= n:
            dp[i+1] += dp[i]
        if i + 2 <= n:
            dp[i+2] += dp[i]
    print(dp[-1]%MOD)
     main n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m a = [0] * n a [0] * n [0] 0 n MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 for _ in range(m):
        a[int(input())] = 1
     _ range(m) range m a[int(input())] = 1 a[int(input())] a int(input()) int input() input 1 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(n):
        dp[i] %= MOD
        if a[i]:
            dp[i] = 0
        if i + 1 <= n:
            dp[i+1] += dp[i]
        if i + 2 <= n:
            dp[i+2] += dp[i]
     i range(n) range n dp[i] %= MOD dp[i] dp i MOD if a[i]:
            dp[i] = 0
         a[i] a i dp[i] = 0 dp[i] dp i 0 if i + 1 <= n:
            dp[i+1] += dp[i]
         i + 1 <= n i + 1 i 1 n dp[i+1] += dp[i] dp[i+1] dp i+1 i 1 dp[i] dp i if i + 2 <= n:
            dp[i+2] += dp[i]
     i + 2 <= n i + 2 i 2 n dp[i+2] += dp[i] dp[i+2] dp i+2 i 2 dp[i] dp i print(dp[-1]%MOD) print dp[-1]%MOD dp[-1] dp -1 MOD if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input def main():
    n, m = map(int, input().split())
    a = [0] * n
    MOD = 10 ** 9 + 7
    for _ in range(m):
        a[int(input())] = 1
    dp = [0] * (n+1)
    dp[0] = 1
    for i in range(n):
        dp[i] %= MOD
        if a[i]:
            dp[i] = 0
        if i + 1 <= n:
            dp[i+1] += dp[i]
        if i + 2 <= n:
            dp[i+2] += dp[i]
    print(dp[-1]%MOD)
     def main():
    n, m = map(int, input().split())
    a = [0] * n
    MOD = 10 ** 9 + 7
    for _ in range(m):
        a[int(input())] = 1
    dp = [0] * (n+1)
    dp[0] = 1
    for i in range(n):
        dp[i] %= MOD
        if a[i]:
            dp[i] = 0
        if i + 1 <= n:
            dp[i+1] += dp[i]
        if i + 2 <= n:
            dp[i+2] += dp[i]
    print(dp[-1]%MOD)
     main
import sys
input = lambda: sys.stdin.readline().rstrip()

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