import sys
import itertools
# import numpy as np
import time
import math
import heapq
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
INF = 10 ** 9 + 7

# map(int, input().split())
# list(map(int, input().split()))

N, M = map(int, input().split())
A = set()
for i in range(M):
    a = int(input())
    A.add(a)


dp = [0] * (N + 1)
dp[0] = 1
if not 1 in A:
    dp[1] = 1
for i in range(2, N + 1):
    dp[i] = (dp[i - 1] + dp[i - 2]) % INF
    if i in A:
        dp[i] = 0
print(dp[N])
# ans = 1
# cur = 0
# for a in A:
#     steps = (a - 1) - cur
#     cur = a + 1 import sys sys import itertools itertools import time time import math math import heapq heapq sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 from collections import defaultdict read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines INF = 10 ** 9 + 7 INF 10 ** 9 + 7 10 ** 9 10 9 7 N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M A = set() A set() set for i in range(M):
    a = int(input())
    A.add(a) i range(M) range M a = int(input()) a int(input()) int input() input A.add(a) A.add A add a dp = [0] * (N + 1) dp [0] * (N + 1) [0] 0 N + 1 N 1 dp[0] = 1 dp[0] dp 0 1 if not 1 in A:
    dp[1] = 1 not 1 in A 1 in A 1 A dp[1] = 1 dp[1] dp 1 1 for i in range(2, N + 1):
    dp[i] = (dp[i - 1] + dp[i - 2]) % INF
    if i in A:
        dp[i] = 0 i range(2, N + 1) range 2 N + 1 N 1 dp[i] = (dp[i - 1] + dp[i - 2]) % INF dp[i] dp i (dp[i - 1] + dp[i - 2]) % INF dp[i - 1] + dp[i - 2] dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 INF if i in A:
        dp[i] = 0 i in A i A dp[i] = 0 dp[i] dp i 0 print(dp[N]) print dp[N] dp N M = map(int, input().split()) map(int, input().split()) M read = sys.stdin.buffer.read sys.stdin.buffer.read read N, M = map(int, input().split()) map(int, input().split()) N readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines a = int(input()) int(input()) a A = set() set() A INF = 10 ** 9 + 7 10 ** 9 + 7 INF readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline dp = [0] * (N + 1) [0] * (N + 1) dp
import sys
import itertools
# import numpy as np
import time
import math
import heapq
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
INF = 10 ** 9 + 7

# map(int, input().split())
# list(map(int, input().split()))

N, M = map(int, input().split())
A = set()
for i in range(M):
    a = int(input())
    A.add(a)


dp = [0] * (N + 1)
dp[0] = 1
if not 1 in A:
    dp[1] = 1
for i in range(2, N + 1):
    dp[i] = (dp[i - 1] + dp[i - 2]) % INF
    if i in A:
        dp[i] = 0
print(dp[N])
# ans = 1
# cur = 0
# for a in A:
#     steps = (a - 1) - cur
#     cur = a + 1
