import sys
import math
import itertools
import collections
from collections import deque
from collections import defaultdict

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():
    
    N, M = NMI()
    A = [NI() for _ in range(M)]
    
    broken = [1 for _ in range(N+1)]
    
    for a in A:
        broken[a] = 0
    
    dp = [0 for _ in range(N+1)]
    
    dp[0] = 1
    dp[1] = int(not(1 in A))
    
    for n in range(2,N+1):
        dp[n] = ((dp[n-1]*broken[n-1] + dp[n-2]*broken[n-2])*broken[n])%MOD
        
    print(dp[N])


if __name__ == '__main__':
    main() import sys sys import math math import itertools itertools import collections collections from collections import deque from collections import defaultdict sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 MOD2 = 998244353 MOD2 998244353 INF = float('inf') INF float('inf') float 'inf' input = lambda: sys.stdin.readline().strip() input lambda: sys.stdin.readline().strip() sys.stdin.readline().strip() sys.stdin.readline().strip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline strip NI = lambda: int(input()) NI lambda: int(input()) int(input()) int input() input NMI = lambda: map(int, input().split()) NMI lambda: map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split NLI = lambda: list(NMI()) NLI lambda: list(NMI()) list(NMI()) list NMI() NMI SI = lambda: input() SI lambda: input() input() input def main():
    
    N, M = NMI()
    A = [NI() for _ in range(M)]
    
    broken = [1 for _ in range(N+1)]
    
    for a in A:
        broken[a] = 0
    
    dp = [0 for _ in range(N+1)]
    
    dp[0] = 1
    dp[1] = int(not(1 in A))
    
    for n in range(2,N+1):
        dp[n] = ((dp[n-1]*broken[n-1] + dp[n-2]*broken[n-2])*broken[n])%MOD
        
    print(dp[N]) main N, M = NMI() N NMI() NMI M NI() for _ in range(M) for _ in range(M) _ range(M) range M for _ in range(M) NI() NI A = [NI() for _ in range(M)] A [NI() for _ in range(M)] 1 for _ in range(N+1) for _ in range(N+1) _ range(N+1) range N+1 N 1 for _ in range(N+1) 1 broken = [1 for _ in range(N+1)] broken [1 for _ in range(N+1)] for a in A:
        broken[a] = 0
    
     a A broken[a] = 0 broken[a] broken a 0 0 for _ in range(N+1) for _ in range(N+1) _ range(N+1) range N+1 N 1 for _ in range(N+1) 0 dp = [0 for _ in range(N+1)] dp [0 for _ in range(N+1)] dp[0] = 1 dp[0] dp 0 1 dp[1] = int(not(1 in A)) dp[1] dp 1 int(not(1 in A)) int not(1 in A) 1 in A 1 A for n in range(2,N+1):
        dp[n] = ((dp[n-1]*broken[n-1] + dp[n-2]*broken[n-2])*broken[n])%MOD
        
     n range(2,N+1) range 2 N+1 N 1 dp[n] = ((dp[n-1]*broken[n-1] + dp[n-2]*broken[n-2])*broken[n])%MOD dp[n] dp n ((dp[n-1]*broken[n-1] + dp[n-2]*broken[n-2])*broken[n])%MOD (dp[n-1]*broken[n-1] + dp[n-2]*broken[n-2])*broken[n] dp[n-1]*broken[n-1] + dp[n-2]*broken[n-2] dp[n-1]*broken[n-1] dp[n-1] dp n-1 n 1 broken[n-1] broken n-1 n 1 dp[n-2]*broken[n-2] dp[n-2] dp n-2 n 2 broken[n-2] broken n-2 n 2 broken[n] broken n MOD print(dp[N]) print dp[N] dp N if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main MOD2 = 998244353 998244353 MOD2 SI = lambda: input() lambda: input() SI MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD input = lambda: sys.stdin.readline().strip() lambda: sys.stdin.readline().strip() input def main():
    
    N, M = NMI()
    A = [NI() for _ in range(M)]
    
    broken = [1 for _ in range(N+1)]
    
    for a in A:
        broken[a] = 0
    
    dp = [0 for _ in range(N+1)]
    
    dp[0] = 1
    dp[1] = int(not(1 in A))
    
    for n in range(2,N+1):
        dp[n] = ((dp[n-1]*broken[n-1] + dp[n-2]*broken[n-2])*broken[n])%MOD
        
    print(dp[N]) def main():
    
    N, M = NMI()
    A = [NI() for _ in range(M)]
    
    broken = [1 for _ in range(N+1)]
    
    for a in A:
        broken[a] = 0
    
    dp = [0 for _ in range(N+1)]
    
    dp[0] = 1
    dp[1] = int(not(1 in A))
    
    for n in range(2,N+1):
        dp[n] = ((dp[n-1]*broken[n-1] + dp[n-2]*broken[n-2])*broken[n])%MOD
        
    print(dp[N]) main INF = float('inf') float('inf') INF NMI = lambda: map(int, input().split()) lambda: map(int, input().split()) NMI NLI = lambda: list(NMI()) lambda: list(NMI()) NLI NI = lambda: int(input()) lambda: int(input()) NI
import sys
import math
import itertools
import collections
from collections import deque
from collections import defaultdict

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():
    
    N, M = NMI()
    A = [NI() for _ in range(M)]
    
    broken = [1 for _ in range(N+1)]
    
    for a in A:
        broken[a] = 0
    
    dp = [0 for _ in range(N+1)]
    
    dp[0] = 1
    dp[1] = int(not(1 in A))
    
    for n in range(2,N+1):
        dp[n] = ((dp[n-1]*broken[n-1] + dp[n-2]*broken[n-2])*broken[n])%MOD
        
    print(dp[N])


if __name__ == '__main__':
    main()