#!/usr/bin/env python
import sys 
input = sys.stdin.readline

n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = 1000000007

dp = [-1 for _ in range(n)]
for i in range(m):
    dp[a[i]-1] = 0 

if n == 1:
    print(1)
    exit()
if n == 2:
    if m == 0:
        print(2)
        exit()
    elif m == 1:
        print(1)
        exit()

if dp[0] != 0:
    dp[0] = 1 
if dp[1] != 0:
    dp[1] = dp[0]+1

for i in range(2, n): 
    if dp[i] == 0:
        continue
    dp[i] = (dp[i-1] + dp[i-2])%mod

print(dp[n-1]) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split 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 = 1000000007 mod 1000000007 -1 for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) -1 dp = [-1 for _ in range(n)] dp [-1 for _ in range(n)] for i in range(m):
    dp[a[i]-1] = 0  i range(m) range m dp[a[i]-1] = 0 dp[a[i]-1] dp a[i]-1 a[i] a i 1 0 if n == 1:
    print(1)
    exit() n == 1 n 1 print(1) print 1 exit() exit if n == 2:
    if m == 0:
        print(2)
        exit()
    elif m == 1:
        print(1)
        exit() n == 2 n 2 if m == 0:
        print(2)
        exit()
    elif m == 1:
        print(1)
        exit() m == 0 m 0 print(2) print 2 exit() exit elif m == 1:
        print(1)
        exit() m == 1 m 1 print(1) print 1 exit() exit if dp[0] != 0:
    dp[0] = 1  dp[0] != 0 dp[0] dp 0 0 dp[0] = 1 dp[0] dp 0 1 if dp[1] != 0:
    dp[1] = dp[0]+1 dp[1] != 0 dp[1] dp 1 0 dp[1] = dp[0]+1 dp[1] dp 1 dp[0]+1 dp[0] dp 0 1 for i in range(2, n): 
    if dp[i] == 0:
        continue
    dp[i] = (dp[i-1] + dp[i-2])%mod i range(2, n) range 2 n if dp[i] == 0:
        continue
     dp[i] == 0 dp[i] dp i 0 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[n-1]) print dp[n-1] dp n-1 n 1 input = sys.stdin.readline sys.stdin.readline input m = map(int, input().split()) map(int, input().split()) m a = [int(input()) for _ in range(m)] [int(input()) for _ in range(m)] a mod = 1000000007 1000000007 mod n, m = map(int, input().split()) map(int, input().split()) n dp = [-1 for _ in range(n)] [-1 for _ in range(n)] dp
#!/usr/bin/env python
import sys 
input = sys.stdin.readline

n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = 1000000007

dp = [-1 for _ in range(n)]
for i in range(m):
    dp[a[i]-1] = 0 

if n == 1:
    print(1)
    exit()
if n == 2:
    if m == 0:
        print(2)
        exit()
    elif m == 1:
        print(1)
        exit()

if dp[0] != 0:
    dp[0] = 1 
if dp[1] != 0:
    dp[1] = dp[0]+1

for i in range(2, n): 
    if dp[i] == 0:
        continue
    dp[i] = (dp[i-1] + dp[i-2])%mod

print(dp[n-1])
